Does anyone know how to wait for word to finish printing
before quitting the application.
I've got a button on a form that automatically prints out a word document, but at the moment I either get
1. A copy of WINWORD.exe is left running on the system when I don't use the objWord.application.Quit command or
2. Word pops up and asks me do i really want to quit and cancel all documents sent to the printer?
here's the code:
Dim objWord as Word.Application
Set objWord = New Word.Application
objWord.Documents.Open FileName:=sFilename
objWord.PrintOut , , , , , , , CInt(Me.txtBrief)
objWord.Documents.Close
objWord.Application.Quit
Set objWord = Nothing
Anyone got suggestions.
before quitting the application.
I've got a button on a form that automatically prints out a word document, but at the moment I either get
1. A copy of WINWORD.exe is left running on the system when I don't use the objWord.application.Quit command or
2. Word pops up and asks me do i really want to quit and cancel all documents sent to the printer?
here's the code:
Dim objWord as Word.Application
Set objWord = New Word.Application
objWord.Documents.Open FileName:=sFilename
objWord.PrintOut , , , , , , , CInt(Me.txtBrief)
objWord.Documents.Close
objWord.Application.Quit
Set objWord = Nothing
Anyone got suggestions.