Click here to Skip to main content
16,012,316 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
When I try to deal with my MS Word automation program in the following steps:
1,Start a winword.exe process by new Word.ApplicationClass();
2,Open a .doc document;
3,Do something with the opened document.
4,Close the document,and go to step2.

And I find that the memory taken by winword.exe increases and releases little even if after the doc.Close( , , ) as the program executes as steps above.That's a problem!how can i deal with it.thank you!
Posted
Comments
[no name] 29-Oct-10 5:57am    
are you disposing objects? closing your streams?

1 solution

Use this method after closing document.

wordApp.Application.Quit(ref missing, ref missing, ref missing);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900