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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top