How can I get a list of the available printer names?

K

Ken

I came across this Word code that also works in Excel. However, it doesn't
give the complete name of the printer.
http://word.mvps.org/FAQs/MacrosVBA/AvailablePrinters.htm

Here is the list it generated on my system:

Quicken PDF Printer
Microsoft XPS Document Writer
Microsoft Office Document Image Writer
HP Photosmart 2600 series
Generic / Text Only
DYMO LabelWriter 330 Turbo
DELL3110cn-417FC9-PS
DELL3110cn-417FC9
Dell Laser Printer 1700n PS3
Adobe PDF

The problem is that the name needed to reference the printer called "Adobe
PDF" is actually "Adobe PDF on Ne04". The "Dell Laser Printer 1700n PS3" is
"Dell Laser Printer 1700n PS3 on Ne07", etc. So windows always adds the "on
NeXX" (where XX is a number generated somehow by windows) to each name.

Would anyone like to modify the code to grap the full printer name? It would
also be appreviated if someone could also include how to always get the
printer name that starts with "Adobe PDF" that would be greatly appreciated
as well.

Thanks,

Ken
 
J

JLGWhiz

The NeXX is your printer port on the network server. I am not on a network
now and I do not rmember how to call up the network dialog box that gives
the printer data. But it seems that there was such a thing and that you
should be able to get to it through VBA.
 

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