Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Memory increase problem in winword.exe in office automation word20
Hi,
I am using office automation in windows service, I have one static object of ms word app that remains available throughout the webservice. i create the object when the windows service is started and this object is destroyed when service is stopped. my problem is that since winword object is destroyed when service is stopped, throughout same word object is used. Now on doing word operations, memory is getting increased. I m using the following code. Please help me on this. I m using following code in when i start windows service private static Microsoft.Office.Interop.Word.ApplicationClass oWordApp = null; private static Microsoft.Office.Interop.Word.Document oWordDoc = null; oWordApp = new Microsoft.Office.Interop.Word.ApplicationClass(); oWordDoc = oWordApp.Documents.Add(ref missing, ref missing, ref missing, ref missing); // the abobe line is, so that if some body opens word doc by double click on explorer and then on closing word doc, my winnword.exe does not get killed.// then operations for word are performed. when service is stopped then i close word if (oWordDoc != null) { oWordDoc.Close(ref missing, ref missing, ref missing); oWordDoc = null; } if (oWordApp != null) { oWordApp.Application.Quit(ref missing, ref missing, ref missing); oWordApp = null; } Regards, Vinita -- |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Memory increase problem in winword.exe in office automation word20
Hi Vinita
Vinita Batra wrote: I am using office automation in windows service, I have one static object of ms word app that remains available throughout the webservice. [..] you're chances of finding an expert for your problem in this "general purpose" Word forum (or ".word.docmanagement" newsgroup, depending on how you reach us) are slim at best. Try one of the .word.vba groups for better luck if you think that the experts with the Word OM might help you. In the mean time, maybe the following articles may shed some light: Considerations for server-side Automation of Office http://support.microsoft.com/?scid=k...57757&x=8&y=11 Basic Instincts €“ Server-Side Generation of Word 2007 Docs http://msdn.microsoft.com/msdnmag/is...lt.aspx?loc=en HTH Robert -- /"\ ASCII Ribbon Campaign | MSFT | \ / | MVP | Scientific Reports X Against HTML | for | with Word? / \ in e-mail & news | Word | http://www.masteringword.eu/ |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible to increase memory in Word 2003? | Microsoft Word Help | |||
increase memory recent doc list on word file menu | Microsoft Word Help | |||
Increase size of Virtual Memory | Microsoft Word Help | |||
How do I increase memory to make pictures visible in a word doc? | Tables | |||
why does winword.exe stay in memory | Microsoft Word Help |