Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quit after print jobs are complete Code Help 1

Status
Not open for further replies.

adscrims

Programmer
Aug 21, 2001
24
GB
Does anybody know any code on: only quit an active documnent after the print jobs have finished. Currently my code does this. It opens a document prints it and quits word. However an error message occurs which says do you want to quit before printing is complete. Hope this is clear Andy Thanks in advance :-9
 
Hi!

One possibility is to put the following line between the print and the quit lines:

Call MsgBox("Please continue when the printing is complete", vbOkayOnly)

This will halt the VB code until the user clicks the okay button. Unless the document is unusually long, the printing should be complete even if the user clicks the button as soon as they can get the mouse to it.

In another thread, someone recommended the use of the Idle method. I'm not sure how well that works since I haven't used it personally, but it may be worth your while to look it up in the Help files.

hth
Jeff Bridgham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top