Word Application NOT Disposing in VB.NET

jesus4u

Well-known member
Joined
Feb 13, 2003
Messages
47
In vb.net I am opening (800+) Word docs. But when I am finished I am setting to nothing the Word Applciation and in the Task Manager it is still there. Why?

Code:
Dim wrdApp As New Word.Application
etc.......
Dim wrdDoc As New Word.Document
wrdDoc = wrdApp.Documents.Open(fiTemp.FullName, , True)
etc.......
wrdDoc.Close(False)
wrdDoc = Nothing

wrdApp = Nothing
 
shouldnt you be closing the actuall word application rather than just the document? eg:
Code:
Dim wrdApp As New Word.Application
etc.......
Dim wrdDoc As New Word.Document
wrdDoc = wrdApp.Documents.Open(fiTemp.FullName, , True)
etc.......

wrdApp.Quit() /// close the word application.

wrdDoc = Nothing

wrdApp = Nothing
 
Back
Top