Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have been using Mr. Mayor's following macro for word (I use word 2007) which lets me print to any tray I specify in the macro and I have two macros set up for two different trays. Sub LaserTray1() Dim sCurrentPrinter As String Dim sTray As Integer sCurrentPrinter = ActivePrinter sTray = Options.DefaultTrayID ActivePrinter = HP LaserJet P2015 Series PCL 5e With Options .DefaultTrayID = 259 End With Application.PrintOut Filename:="" With Options .DefaultTrayID = sTray End With ActivePrinter = sCurrentPrinter End Sub I am unable to use the same code to run in excel 2007 which is obvious as the above code is for word. Is it possible to modify the above code so it works in excel too. Guide me please. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro for printing specific worksheet from a workbook | Excel Programming | |||
Print with paper from a specific printer-tray | Excel Programming | |||
How do I change the paper tray from an Excel macro / vba module? | Excel Programming | |||
Printing worksheet with printer tray # 3 | Excel Programming | |||
I can't quite get the syntax for printing to the manual feed tray | Excel Programming |