Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Thu, 2 Feb 2006 11:54:13 -0800,    group: microsoft.public.word.oleinterop        back       


Word Automation without Word running   
Hello, I was wondering if there is a plan in the next version of Word to 
allow adding a reference to the Word class without Word being started in the 
background?

For example everytime you do an Application objApp = new Application(), a 
new instance of Word is started in the background. Which is a huge memory hog 
and posses a problem for those who need more than one person to access a 
class that is built with a reference to Word class.

Why is it made this way and is there a way around it?

Thank you for your time.
date: Thu, 2 Feb 2006 11:54:13 -0800   author:   @discussions.microsoft.com

Re: Word Automation without Word running   
Forgive my ignorance but what exactly are you suggesting? A sort of cut-down
Word or something? Which bits of Word would you like to be able to access
without a Word application object existing?

--
Enjoy,
Tony


"steve.welborn@bitwisesolutions.com"
<steve.welborn@bitwisesolutions.com@discussions.microsoft.com> wrote in
message news:C796A623-6333-4D16-9CB4-5833F8E41D32@microsoft.com...
> Hello, I was wondering if there is a plan in the next version of Word to
> allow adding a reference to the Word class without Word being started in
the
> background?
>
> For example everytime you do an Application objApp = new Application(), a
> new instance of Word is started in the background. Which is a huge memory
hog
> and posses a problem for those who need more than one person to access a
> class that is built with a reference to Word class.
>
> Why is it made this way and is there a way around it?
>
> Thank you for your time.
date: Fri, 3 Feb 2006 07:28:06 -0000   author:   Tony Jollans My Forename at My Surname dot com

Re: Word Automation without Word running   
Replied to duplicate question in one of the developer 
groups

    Cindy Meister
date: Fri, 03 Feb 2006 18:52:14 +0100   author:   Cindy M -WordMVP-

Re: Word Automation without Word running   
Thank you both for the reply and Cindy I read your reply just now on the 
other forum.

Just to better explain: 
 I have a web app that allows my users to create a proposal for service to 
be done. They have a series of 'Elements' to choose from that will specify 
what they want to appear in the final document. Each element is a word 
document.
After they choose the elements the app then creates a temp document,  loops 
through the list of elements they chose, then writes the contents of the 
opened document inside the temp, closes the opened document and goes to the 
next one.

The final output would be all the element pages inside one document.

Now my problem was, trying to open a word document in a FileStream and 
reading its contents..sure it works. But there is no way of knowing what is 
Bold, Italic, Underlined, Font size or anything. I needed to merge the 
documents 100% exactly how it is in the original. So doing it that way is 
useless.

My only option if I wanted to do it that way was use Word by referencing it. 
Which by doing so opens a new instance of Word. Which is pointless. 10 people 
visiting the site doing this the whole server bogs down.

What I ended up doing is forcing the client to convert to .rtf and im 
opening it by FileStream and reading/writing and it works fine.

Point is, I should of been able to view what is bold, italic, underlined, 
and get font size without having to mess with Word application itself being 
opened. 

Hope this makes sense
date: Fri, 3 Feb 2006 10:29:14 -0800   author:   unknown

Re: Word Automation without Word running   
Hi =?Utf-8?B?c3RldmUud2VsYm9ybkBiaXR3aXNlc29sdXRpb25zLmNvbQ==?=, 

> I have a web app that allows my users to create a proposal for service to 
> be done. They have a series of 'Elements' to choose from that will specify 
> what they want to appear in the final document. Each element is a word 
> document.
> After they choose the elements the app then creates a temp document,  loops 
> through the list of elements they chose, then writes the contents of the 
> opened document inside the temp, closes the opened document and goes to the 
> next one.
>  
> The final output would be all the element pages inside one document.
>  
> Now my problem was, trying to open a word document in a FileStream and 
> reading its contents..sure it works. But there is no way of knowing what is 
> Bold, Italic, Underlined, Font size or anything. I needed to merge the 
> documents 100% exactly how it is in the original. So doing it that way is 
> useless.
>  
> My only option if I wanted to do it that way was use Word by referencing it. 
> Which by doing so opens a new instance of Word. Which is pointless. 10 people 
> visiting the site doing this the whole server bogs down.
>  
> What I ended up doing is forcing the client to convert to .rtf and im 
> opening it by FileStream and reading/writing and it works fine.
>  
> Point is, I should of been able to view what is bold, italic, underlined, 
> and get font size without having to mess with Word application itself being 
> opened. 
>  
> Hope this makes sense
>
Yes, this makes sense. RTF, HTML or, if you can be sure the users have Word 
2003, XML are definitely the correct approaches for the kind of application you 
describe. Note, too, that for Office 12 Microsoft has announced it will be 
releasing conversion filters so that all preveious versions of Word can open the 
XML file formats. In about a year, XML would become an option for you if you 
need to support all current versions of Word.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply 
in the newsgroup and not by e-mail :-)
date: Sat, 04 Feb 2006 18:45:56 +0100   author:   Cindy M -WordMVP-

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us