Printer properties in VBA

G

GwenP

Does anyone know how to get any other printer properties besides the active
printer name in VBA? I'm trying to select different paper trays depending on
which printer users are printing to, but only seem to be able to hardcode the
active printer names into the vba code. This is OK, but if we change the
printer name at any time I will have to (firstly remember to) sift through my
code for every instance of the printer name! Not ideal - would be better if I
could read the driver name or model of printer? Any ideas please?

Thanks
GwenP
 
J

Jonathan West

GwenP said:
Does anyone know how to get any other printer properties besides the
active
printer name in VBA? I'm trying to select different paper trays depending
on
which printer users are printing to, but only seem to be able to hardcode
the
active printer names into the vba code. This is OK, but if we change the
printer name at any time I will have to (firstly remember to) sift through
my
code for every instance of the printer name! Not ideal - would be better
if I
could read the driver name or model of printer? Any ideas please?

Thanks
GwenP

Controlling the Printer from Word VBA
Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

Controlling the Printer from Word VBA
Part 3: Dealing with Different Paper Sizes
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=132

Controlling the Printer from Word VBA
Part 4: Getting printer driver details
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top