Link to home
Start Free TrialLog in
Avatar of loywm
loywm

asked on

Printer Spooling Check in VB

how to make sure that the printer has complete spooling the word document before closing the document / quit the word application in the VB program.

My program look like this :

dim wordapp as word.application
dim worddoc as word.document  

Set wordapp = CreateObject( "Word.Application")

set worddoc = wordapp.Documents.Open "c:\test.doc"

worddoc.PrintOut
worddoc.close
worddoc.quit
ASKER CERTIFIED SOLUTION
Avatar of st_steve
st_steve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you set printbackground flag to false before printout?


i.e.

worddoc.application.Options.PrintBackground = false
worddoc.PrintOut


I have try this yet
Or

If worddoc.Application.BackgroundPrintingStatus > 0 Then
    debug.print "print jobs are queued up"
End If