Experimentation with Word.Application and winword.exe stay in memory

  • Thread starter Thread starter Helene Day
  • Start date Start date
H

Helene Day

I did some experimentation in VB6 and VB.Net.
With both applications, setting my Word.Application to nothing will not
release winword.exe from memory.
Also, I may have multiple copy of them... when you start/stop the
application mutiple times. ??????

This is my vb6 code:

Dim oApplication As Word.Application
Dim oDocument As Word.Document

'Set oApplication = CreateObject("Word.Application") or
Set oApplication = New Word.Application

Set oDocument = oApplication.Documents.Add("C:\....")
....do something with the document.

oDocument.SaveAs ("C:\Test.doc")
oDocument.Close
Set oDocument = Nothing

Set oApplication = Nothing

My VB.NET code is similar, I import:
Imports Word = Microsoft.Office.Interop.Word

Any help would be appreciated,

Thanks

Helene
 
Back
Top