Closing Instance of Word

  • Thread starter Thread starter Jeff Freilich
  • Start date Start date
J

Jeff Freilich

Hi All

I am using Access 2000

I am using the following code to open a Word document, extract some
information to populate into my access database and then close
document - my issue is that it seems to be keeping an instance of Word
open every time (Word is not actually open but if you go to task
manager it shows all of the open Word processes)

How can I kill the instance of word once I am done with it - I thgouth
setting appword= Nothing would do that - any suggestions?

Thanks,

Jeff

Dim appWord As Word.Application
Dim OL As Word.Document

Set appWord = New Word.Application
Set OL = appWord.Documents.Open(Me.txtOLFileName.Value) 'Change the
path and file name as required.
ImportA '(This is the Procedure I use to extract infrormation - I can
provide if needed)
OL.Close wdDoNotSaveChanges
Set OL = Nothing
Set appWord = Nothing
 
Back
Top