Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Vinita Batra Vinita Batra is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Robert M. Franz (RMF) Robert M. Franz (RMF) is offline
external usenet poster
 
Posts: 1,741
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to increase memory in Word 2003? birdfishy Microsoft Word Help 1 November 30th 07 08:30 AM
increase memory recent doc list on word file menu buttercup Microsoft Word Help 1 August 1st 06 12:44 PM
Increase size of Virtual Memory WNCHOMES Microsoft Word Help 0 April 11th 06 03:58 PM
How do I increase memory to make pictures visible in a word doc? AdH Tables 2 April 7th 06 09:24 AM
why does winword.exe stay in memory missvickie Microsoft Word Help 2 October 11th 05 12:47 AM


All times are GMT +1. The time now is 09:42 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"