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

后端 未结 13 1814
没有蜡笔的小新
没有蜡笔的小新 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:28

    I had tried to automate a document's creation in word from vb.net, but winword.exe was still running, even after I closed the document. I stumbled upon a solution to this problem; I moved the dim of the word object to inside the subroutine I was using to edit the document, as opposed to dimensioning it independent of a subroutine (my initial method).

    Hope this helps.

提交回复
热议问题