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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Macros in MicrosoftWord

Status
Not open for further replies.

SiphoNombebe

Programmer
Apr 11, 2003
3
ZA
I have a word document that uses a macro to do the mailmerge and print to the printer and then it should close the word document after printing. When I use the code below in my macro to check if the printing status is complete and then close the word document, it does not work, it prints but does not close the word document.

Any ideas?

If Application.BackgroundPrintingStatus = 0 Then
Application.Quit (N)
End If
 
Do something like this:
___

While Application.BackgroundPrintingStatus
Doevents
Wend
Application.Quit N
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top