WinWord.exe won't quit after calling Word.Documents.Add - Word .NET Interop

后端 未结 13 1769
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 06:27

I\'m running into the classic scenario where, when creating Word COM objects in .NET (via the Microsoft.Office.Interop.Word assembly), the WinWord process won\'t exit even t

相关标签:
13条回答
  • 2020-11-30 07:31

    You should not discard the document object created in Word.Documents.Add. Save and call Marshal.ReleaseComObject on every COM object you get from automation when you are done, that is, if you do not cache the objects anywhere.

    0 讨论(0)
提交回复
热议问题