次のコードを検討してください。
using Microsoft.Office.Interop.Word;
ApplicationClass _application = new ApplicationClass();
_application によって起動された Winword.exe プロセスから PID を取得できますか?
ファイルが破損していると、次のコードを使用しても ApplicationClass を終了できないため、PID が必要です。
_application.Quit(ref saveFile, ref missing, ref missing);
System.Runtime.InteropServices.Marshal.ReleaseComObject(_application);
GC.Collect();
GC.WaitForPendingFinalizers();
winword.exe プロセスを検索して強制終了することはできません。複数のプロセスがあり、どれを強制終了するかわからないからです。各 ApplicationClass の PID を取得できれば、終了するのに苦労している正しい winword.exe プロセスを強制終了できます。