Printing Double-Sided
Try the following code.
Sub PrintDoubleSided()
Dim Totalpages As Long
Dim pg As Long
Dim oddoreven As Integer
On Error GoTo enditt
Totalpages = ExecuteExcel4Macro("Get.Document(50)")
oddoreven = InputBox("Enter 1 for Odd, 2 for Even")
For pg = oddoreven To Totalpages Step 2
ActiveWindow.SelectedSheets.PrintOut from:=pg, To:=pg
Next pg
enditt:
End Sub
Is that what you are looking for?
With regards
Sridhar
"AccessNoob" wrote:
Hi,
I am trying to do double sided printing in excel with multiple worksheets
(20). In order to print double-sided, I need to (within Excel) select File
- Print - Properties and select "Flip on long side" in order to adjust one
worksheet. Excel does not change the printing preference for all desired
worksheet if i select them all at once (it jsut change whichever worksheet is
active). Is there a quicker way to do it (even VBA will be good for me) so
that i can choose the preference once and it will apply to all worksheets?
I know that i can (within window) go to Printer/Fax, right click on the
printer and select Property, and select "Flip on long side". However, this
only works for new Excel files or existing Excel files that have not been
modified for the printing preferences. However, I currently have tons of
Excel files (with modified, incorrect printing preferences) that I would like
to print. Can anyone offer some soln so that i do not need to go through each
worksheet in all these files? Much Appraciated!
Drawde
However,
|