I am playing with Microsoft word document from ASP.NET/C# program.
My programs opens up word docs internally. using
app = new Word.Application();
app.Documents.Open
it creates a instance of winword.exe process, I can see it in Task Manager.
even if I closes Doc using close()
and app.quit()
. it should kill the process. but this process doesnt get killed.
any idea how to kill this process programmatically.
To begin, I agree with Arthur and Ivo: don't use Word automation on the server... it's not supported and it's painful.
If you must use Word automation:
The winword.exe should go away if you follow the above, you should not need to kill the process.
Edit: Not really an answer to your question, but on topic nonetheless. Keep in mind that you're also going to have problems on the server with permissions. Make sure you create a specific user for it and use that user as your AppPool identity (or service identity). You'll then need to do the following:
{000209FF-0000-0000-C000-000000000046}
") -> PropertiesOn top of all that, you still might need to run winword.exe once as your AppPool user directly from the server, despite the dialog options above, to initially setup the profile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With