Word Automation - Winword.exe does not quit
Posted on 2009-02-10
I am requiring to write a ActiveX DLL which opens a Word instance on the server, opens a doc, prints it to various printers & trays, and then closes again. The DLL is called from ASP on IIS.
I have stripped out all other code from the DLL and tested the following:
Dim WordObj As Word.Application
Set WordObj = New Word.Application
Set WordObj = Nothing
The above leaves winword.exe running on the server, (in processes). If I call the DLL from the ASP page again, it will leave another version of winword.exe running, and so and so on.
I have tried "Set WordObj = CreateObject("Word.Application")" instead, but this produces the same result.
Have searched this site and google and cannot find an answer on why WordObj.Quit will not kill the winword.exe instance.