wait for envelope print

M

mmaphq

Have a vba pgm that prints an envelope. Operator then enters some data into
the doc. Then pgm prints the document.
We use background printing.

How do we delay while the operator enters some data into the doc. So the pgm
will print the changed doc? TIA
 
J

Jay Freedman

You have to turn off background printing, Background:=False.

Having background printing turned on means that the PrintOut command starts
a new execution thread to do the pagination and rasterization, while the VBA
thread continues and immediately starts executing the next line of code.
When you turn off background printing, the process stays single-threaded and
VBA is forced to wait until the PrintOut statement finishes.

You can still use background printing for the statement that prints the
document body; it's only the one that prints the envelope that needs to turn
it off.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top