Printout - Word closes before printing starts

J

Joemanc

I have a VB app running on Citrix. I'm using the PrintOut command when a user
goes to print a document. In this case, I have a 14 page document. When I
run the app from my desktop, it prints out ok. When I run the app via Citrix,
because the code is running so fast, it appears the document is trying to
spool, but because I immediately close Word, the document never gets a chance
to get to the printer.

Is there a way for me to tell via code if the document is still printing
from Word?

I've thought of using a timer event but tha's unpredictable because of
different sizes of documents.
 
J

Jay Freedman

Hi Joe,

In the PrintOut command, set the optional Background parameter to False.
That makes the code wait for spooling to complete before it processes the
next command.

wdDoc.PrintOut(Background=False)
 
J

Joemanc

Thanks - it worked perfectly!

Jay Freedman said:
Hi Joe,

In the PrintOut command, set the optional Background parameter to False.
That makes the code wait for spooling to complete before it processes the
next command.

wdDoc.PrintOut(Background=False)
 

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