tags:

views:

47

answers:

3

I am using the office interop to open word documents and saving as html to do parsing work. After a few executions I notice that in the task manager under processes there are still instances of WINWORD.EXE running. I have used the following to close the object but it is still there

wordApp.Quit()
wordApp = Nothingenter code here

How do I close this in order to avoid overhead? Any ideas appreciated

+3  A: 

This other SO question may help you. It's related to Outlook, but the same principles should apply.

Zach Johnson
Thanks for the response. Will keep that info stored.
vbNewbie
+2  A: 

It might have happened during testing where you stopped debugging your code and wordApp.Quit() didn't get executed.

ZippyV
+1  A: 

If the word documents you are processing are docx files, then they would be based on the OpenXml standard(Office OpenXml). DOCX files are really just zip files. You can reference the DocumentFormat.OpenXml.dll (OpenXML SDK) and process docx files without the office interop dll's (and therefore the winword.exe process never actually starts up). This also gives you the benefit of not having Microsoft Word installed on the machine running your program.

Matt Dearing