is possible create macro

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Is it possible to create a Macro to Print Double sided and print

Is it possible to create a Macro to Print Double sided and print

resolvedResolved · Medium Priority · Version 2010

Izabelle has attended:
Excel Intermediate course
Excel Advanced course

Is it possible to create a Macro to Print Double sided and print

We have an existing macro which prints the first page of our bill, including the back page (which sits to the side).

Here is the current macro, I need one which prints the Bill to tray 2, double sided and one that prints it to Tray 1 doubled sided.

Is this possible?

Thanks

Sub print1()
Application.ScreenUpdating = False
ActiveSheet.PrintOut From:=1, To:=2, Copies:=1, Collate:=True
End Sub

Sub print2()
Application.ScreenUpdating = False
ActiveSheet.PrintOut From:=1, To:=4, Copies:=1, Collate:=True
End Sub

Sub print3()
Application.ScreenUpdating = False
ActiveSheet.PrintOut From:=1, To:=6, Copies:=1, Collate:=True
End Sub

Sub print4()
Application.ScreenUpdating = False
Application.Dialogs(xlDialogPrint).Show
End Sub

RE: Is it possible to create a Macro to Print Double sided and p

Hi Izabelle

Thanks for getting in touch.

I hadn't come across this before but I checked online and unfortunately confirmed my suspicions. As the printer options for duplex etc. are not set by Excel they fall outside of VBA'a control.

There might be a way to do accessing the printer's API but it would be fairly complicated, and would depend if the printer manufacturer has published the controls.

Sorry I couldn't be of more help on this occasion.

Kind regards

Gary Fenn
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Wed 3 Oct 2012: Automatically marked as resolved.

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Shortcuts for working with named ranges in Excel

If you are working with or creating named ranges in your spreadsheets, then you may find the following shortcut keys useful.

- Bring up the Define Names dialogue box on screen by using Ctrl + F3 (instead of going to Insert - Names).

- Create Names from labels you have entered into the spreadsheet by highlighting the labels and related figures, then hold down Shift + Ctrl + F3. You can then choose to create names from the top or bottom rows, or left or right columns.

- Go directly to a named range by hitting the F5 key. The Go To dialogue box will open and display any named ranges in the spreadsheet. Simply select the named range to navigate to it in the spreadsheet.

View all Excel hints and tips


Server loaded in 0.1 secs.