Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printer Tray selection from within VBA

760 views
Skip to first unread message

Paul Harwood

unread,
May 2, 2000, 3:00:00 AM5/2/00
to
I need to be able to select a given paper tray from within a VBA app.

I am working on this so I can print the same sheet on to different coloured
paper.

Any Ideas welcome

Roger Butler

unread,
May 2, 2000, 3:00:00 AM5/2/00
to
Paul, if you receive an answer to this one, could you forward it to me
please?

I have looked at this in the past with no joy. Excel VBA doesn't seem to
expose (or at least I cannot find it!) the same properties here as Word.
Word exposes the "FirstPageTray" and "OtherPagesTray" properties of the
pagesetup object, but Excel, it seems, does not.

Thanks

Rog

Paul Harwood <Pau...@auswest.com.au> wrote in message
news:VBwP4.9381$v85....@news-server.bigpond.net.au...

Gordon Wilmot

unread,
May 2, 2000, 3:00:00 AM5/2/00
to
Hi Paul,

If you get this tray selection from the print dialog then you can use:
Application.Dialogs(xlDialogPrint).Show

You will have to select te the tray.

Gordon Wilmot

Hubert Dolega

unread,
May 12, 2000, 3:00:00 AM5/12/00
to
[ posted only to *.printing and *.programming ]

Hello Paul


On Tue, 02 May 2000 08:46:45 GMT, you wrote:
>I need to be able to select a given paper tray from within a VBA app.
>I am working on this so I can print the same sheet on to different coloured
>paper. Any Ideas welcome

I tried to do it in the past too but I gave up when I couldn't find
any pointers. However, I think it's possible but solution would
require hard API coding. IMO it is so difficult because there's lots
of types of printers with different options available.

All I can suggest You is to create a few instances of the same printer
(using 'Add Printer' wizzard), name it for example as:
- HP LaserJet 8100 (Manual Feed),
- HP LaserJet 8100 (Tray 1),
- HP LaserJet 8100 (Duplex)

and according to these names set printer properties.

Then within vba procedure You can access preffered options by setting
printer used with ActivePrinter property:

Application.ActivePrinter = "HP LaserJet 8100 (Duplex) on LPT1:"


--
Best Regards,
Hubert Arkadiusz Dolega
hub...@rava.com.pl

0 new messages