too fast word exit

K

Konrad

I collect some data in excel and than using vba I'm
creating a word doc .
The doc is supposed to be printed.
The last few lines of the vba code execute closing word
doc and exit of word application.
Basically the code is too fast and it trying to close word
to fast - before the print out is done.

Main idea is to make the print out without any influence
of the user.


Next question is it possible to check if the printer is
operational before the code concerning word doc will start
working? (How to allow vba to check that printer is ready
to work)
Suggestions welcome.
Tks

Konrad
 
A

AA

Check Application.BackgroundPrintStatus within a loop and
don't try to close word until it returns 0; will never be
0 if the printer is offline/out of paper and you've sent a
print instruction.
 

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