ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I code a print module to duplex? (https://www.excelbanter.com/excel-programming/346470-how-do-i-code-print-module-duplex.html)

reddington2001

How do I code a print module to duplex?
 
I am writing a VB Sub and I want to tell Excel to duplex my print job. Is
there code like "ActiveSheet.PageSetup.Duplex = 1"? ".Duplex" does not work.
Also is there something to tell Excel which printer tray to use?

dominicb[_170_]

How do I code a print module to duplex?
 

Good evening reddington2001

Duplex printing cannot be handled by all printers. It is a printer
setting rather than an excel setting, so if the printer can't do it,
you're stuck. A routine is available that will allow you to print odd
pages, reinsert them into the printer and print the even pages, a kind
of poor man's duplex, which is pretty much the only alternative if your
printer won't handle it.

http://www.rondebruin.nl/print.htm#odd

Changing the tray is the same type of thing - a printer driver setting,
though you could control it through the Sendkeys command, though it's
hardly ideal. However I have set a HP Laserjet to print to tray 2
(default is tray 3) and then saved the file and it has apeared to save
that setting, but I'll have to investigate that a little more .

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=487800



All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com