using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
Can I get the PID from the Winword.exe process that was lunched by the _application?
I need the PID because with corrupted files, I just cant quit the ApplicationClass, even using this code:
_application.Quit(ref saveFile, ref missing, ref missing);
System.Runtime.InteropServices.Marshal.ReleaseComObject(_application);
GC.Collect();
GC.WaitForPendingFinalizers();
I cant search for the winword.exe process and kill it, because I will have several and I don't know which one to kill. If I can get a PID for each ApplicationClass, I could just kill the correct winword.exe process that is giving me troubles to quit.
Thanks.