Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2007

Tip: Looking for answers? Try searching our database.

wait for envelope print

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mmaphq - 09 Oct 2007 00:46 GMT
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

Signature

_________
MMAP HQ

Jay Freedman - 09 Oct 2007 14:27 GMT
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.

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> 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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.