How does [Wait] work?

M

Mary Gudobba

I'm trying to write a macro that changes the printer to duplex, prints the
document and then changes the printer back to normal. I've been able to do
what I want by using Send Keys, but when I try to change the printer back it
seems to make the change before the document prints. I thought if I could
make the macro pause for a couple of seconds the document would be able to
print and then the macro could continue and change the settings back. Can I
use the Wait function for this and if so, how?
 
J

Jonathan West

Hi Mary,

This article gives a different approach to controlling the duplex state of
the printer, without relying on SendKeys which is rather unreliable.

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 
M

Mary Gudobba

It works! Thank you so much!

Jonathan West said:
Hi Mary,

This article gives a different approach to controlling the duplex state of
the printer, without relying on SendKeys which is rather unreliable.

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com

back Can
 
M

Mary Gudobba

Over the past couple of days I've discovered that this doesn't work with
Windows XP, but it works with Windows 2000. Any ideas?
 
J

Jonathan West

Mary Gudobba said:
Over the past couple of days I've discovered that this doesn't work with
Windows XP, but it works with Windows 2000. Any ideas?

It has worked on Windows XP for me.

The printer driver must be installed locally, even if it is pointing to a
network printer. Could this be the problem?

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 

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