Archive of Mr Excel Message Board


Back to Printing in Excel archive index
Back to archive home

duplex printing

Posted by Nelson Wagner on October 19, 2000 5:59 AM
How can I use VBA to automate duplex printing setting?

Re: duplex printing

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


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.