Jonathan
Mon Sep 27 07:56:45 CDT 2004
"Jules" <jules.farrell@james-chapman.co.uk> wrote in message
news:6362e0f2.0409270331.64ff4dd7@posting.google.com...
> Problem - I have several printers with different numbers of trays
> (some 2, some 3) and they're diferent types they call their trays
> different names.
>
> I create print macros to print letter head (first page from top tray,
> other pages from lower tray, then entire copy on white for file) until
> now I've been creating print macros for each type of printer but it's
> getting time consuming to amend them and visit each PC to load normal
> on.
>
> Any ideas how to write a print macro which can detect which printer
> you're connected to and print leterheads?
You can find the name of the current printer by reading the ActivePrinter
property.
You can find out which paper trays are available on that printer by the
means described in this article
Controlling the Printer from Word VBA
Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101
You will find it easier to maintain and distribute macros if you don't use
normal.dot. Take a look at this article
Distributing macros to other users
http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup