Word 2000
I have a macro that prints a document. The macro displays a user form to
ask the user if the document printed. If so, certain actions are taken. If
not, those actions are skipped. The problem that I have run into is that
the document will not print until AFTER the user clears the dialog box. I
have tried to solve the problem by inserting the following code into the
routine:
PauseTime = 20 ' Set duration.
StartTime = Timer ' Set start time.
Do While Timer < StartTime + PauseTime
DoEvents ' Yield to other processes.
Loop
MessageReason = "Document printed"
DisplayMessage
DisplayMessage is a routine that just displays the message to the user.
Sometimes this works, and sometimes not. Is there a better way to handle
this situation? For example, is there a way to prevent the user form from
being displayed until Word has finished sending the print job?
-- Tom
State of Montana
Department of Justice Help Desk
"Making the world a safer place."
Doug Robbins - 11 Dec 2004 11:20 GMT
Set background printing to false.

Signature
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.
Hope this helps,
Doug Robbins - Word MVP
> Word 2000
>
[quoted text clipped - 26 lines]
>
> "Making the world a safer place."
Montana DOJ Help Desk - 15 Dec 2004 05:45 GMT
Doug,
Your suggestion fixed the problem. Thanks!
-- Tom
State of Montana
Department of Justice Help Desk
"Making the world a safer place."
> Set background printing to false.
>
[quoted text clipped - 28 lines]
> >
> > "Making the world a safer place."