MrExcel Publishing
Your One Stop for Excel Tips & Solutions

duplex printing


Posted by Nelson Wagner on October 19, 2000 5:59 AM

How can I use VBA to automate duplex printing setting?


Posted by Joe on October 19, 2000 1:21 PM


Nelson,
There may be an easier (or better) way, but one thing I've done in the past is to use a SendKeys statement to set the printer to print on both sides.

The keystrokes to send will differ depending on the printer you have. For my printer, the code is:

SendKeys "%fp%r{TAB}{TAB}{+}~~", True

The first five characters bring up the Print box and select the Properties button for the printer. (%=alt key)

In my case, I had to then tab twice to get to the duplexing property. The {+} checks the box, and the two ~ are Enter commands to OK the properties and then send the job to the printer.

Hope this helps.
Joe