ChrisRChamberlain
Programmer
Hi
The following code is from Visual Foxpro where the requirement is to instantiate Word as a COM object, print a file and immediately close the instance of Word.
lcFileName = ALLT(CURRPROJ.filename)
oWord = CreateObject([Word.Application])
oDocument = oWord.Documents.Open(lcFileName)
oDocument.Printout()
oWord.Quit()
As the current program is quitting before the print process is complete, a dialog appears questioning whether Word is to be terminated.
What VBA code is required to force Word to complete the print operation and then close itself down?
TIA
Chris
The following code is from Visual Foxpro where the requirement is to instantiate Word as a COM object, print a file and immediately close the instance of Word.
lcFileName = ALLT(CURRPROJ.filename)
oWord = CreateObject([Word.Application])
oDocument = oWord.Documents.Open(lcFileName)
oDocument.Printout()
oWord.Quit()
As the current program is quitting before the print process is complete, a dialog appears questioning whether Word is to be terminated.
What VBA code is required to force Word to complete the print operation and then close itself down?
TIA
Chris