Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default How can I get a list of the available printer names?

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/...lePrinters.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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default How can I get a list of the available printer names?

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.


"Ken" wrote in message
...
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/...lePrinters.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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
return a list of names, from a large list of repeated names. The Fru Fru Excel Worksheet Functions 5 December 10th 08 01:03 PM
Printer Names on a Network Corey[_3_] Excel Programming 5 December 2nd 08 01:36 PM
Available Printer names to be placed in a range on a sheet and Force selection based on part of Printer name Corey Excel Programming 0 October 3rd 08 01:27 AM
create a random list of names from a list of names in EXCEL Givvie Excel Worksheet Functions 2 October 23rd 06 05:10 AM
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM


All times are GMT +1. The time now is 03:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"