VBA to change duplex setting?

J

jerrybdot

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
 
B

Bob I

The supported options are

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

jerrybdot

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 said:
The supported options are

Sub PrintOut([From], [To], [Copies], [Preview], [ActivePrinter],
[PrintToFile], [Collate], [PrToFileName], [IgnorePrintAreas])
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
 
B

Bob I

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.
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.
:

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
 

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