Discussion Locked

Macro to select printer paper tray

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Can anyone help me with the code to select specific paper-trays from within an Excel-Macro ?

5 replies

by dklippert

You will have to use SendKeys, or set up another copy of the printer set up the way you want and send the print job to that printer.

by haarsaker

Sorry I need code to do this (sendkey unknown to me).
Miltiple copies of printer not feasable (special printer with up to 12 media source trays)

by dklippert

Go to the Help file in the VBA editor. Here's an example:

Application.SendKeys("%fx")

"%" is used for the Alt key, so this line sends Alt+F and the X to shut down Excel. Looka at the help file and substtute the key strokes needd to choose a tray.
I know it seems primitive. It is!

by haarsaker

I agree - this is primitive - but it worked.
Strange that there is no other way to do this ?

This discussion is closed to new replies.