ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA to change duplex setting? (https://www.excelbanter.com/excel-discussion-misc-queries/214200-vba-change-duplex-setting.html)

jerrybdot

VBA to change duplex setting?
 
We have one spreadsheet that has about 15 tabs. I would like to add to my
macro some code that would print some of these spreadsheets duplex and some
simplex. create a macro to print these 15, with some being printing simplex
and others printing duplex. The printer is set up to do duplex as default.
I don't want the user to have to change printer properties before printing
each sheet. So is there a function I can put in my macro like
"printeroptions.duplex.enable" and "printeroptions.duplex.disable" that I
would put right before "ActiveWorkbook.ActiveSheet.PrintOut" that would allow
me to switch like this? On the user's side, all I want him to have to do is
start the macro.

Thank you,
jerrybdot

Bob I

VBA to change duplex setting?
 
The supported options are

Sub PrintOut([From], [To], [Copies], [Preview], [ActivePrinter],
[PrintToFile], [Collate], [PrToFileName], [IgnorePrintAreas])

jerrybdot wrote:

We have one spreadsheet that has about 15 tabs. I would like to add to my
macro some code that would print some of these spreadsheets duplex and some
simplex. create a macro to print these 15, with some being printing simplex
and others printing duplex. The printer is set up to do duplex as default.
I don't want the user to have to change printer properties before printing
each sheet. So is there a function I can put in my macro like
"printeroptions.duplex.enable" and "printeroptions.duplex.disable" that I
would put right before "ActiveWorkbook.ActiveSheet.PrintOut" that would allow
me to switch like this? On the user's side, all I want him to have to do is
start the macro.

Thank you,
jerrybdot



jerrybdot

VBA to change duplex setting?
 
Thanks. Yes, I know the PrintOut options but those do not give me what I
need. I was looking for some function/method/property . . . that would allow
me to switch between duplex and simplex from within a macro.
"Bob I" wrote:

The supported options are

Sub PrintOut([From], [To], [Copies], [Preview], [ActivePrinter],
[PrintToFile], [Collate], [PrToFileName], [IgnorePrintAreas])

jerrybdot wrote:

We have one spreadsheet that has about 15 tabs. I would like to add to my
macro some code that would print some of these spreadsheets duplex and some
simplex. create a macro to print these 15, with some being printing simplex
and others printing duplex. The printer is set up to do duplex as default.
I don't want the user to have to change printer properties before printing
each sheet. So is there a function I can put in my macro like
"printeroptions.duplex.enable" and "printeroptions.duplex.disable" that I
would put right before "ActiveWorkbook.ActiveSheet.PrintOut" that would allow
me to switch like this? On the user's side, all I want him to have to do is
start the macro.

Thank you,
jerrybdot




Bob I

VBA to change duplex setting?
 
That "option" isn't supported. You may effect the same result by
creating one instance of the printer with Duplexing "On", and one
instance with it set to "Off". Then you may select the desired one to
print to in your VBA.

jerrybdot wrote:

Thanks. Yes, I know the PrintOut options but those do not give me what I
need. I was looking for some function/method/property . . . that would allow
me to switch between duplex and simplex from within a macro.
"Bob I" wrote:


The supported options are

Sub PrintOut([From], [To], [Copies], [Preview], [ActivePrinter],
[PrintToFile], [Collate], [PrToFileName], [IgnorePrintAreas])

jerrybdot wrote:


We have one spreadsheet that has about 15 tabs. I would like to add to my
macro some code that would print some of these spreadsheets duplex and some
simplex. create a macro to print these 15, with some being printing simplex
and others printing duplex. The printer is set up to do duplex as default.
I don't want the user to have to change printer properties before printing
each sheet. So is there a function I can put in my macro like
"printeroptions.duplex.enable" and "printeroptions.duplex.disable" that I
would put right before "ActiveWorkbook.ActiveSheet.PrintOut" that would allow
me to switch like this? On the user's side, all I want him to have to do is
start the macro.

Thank you,
jerrybdot






All times are GMT +1. The time now is 04:11 AM.

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