#1
|
|||
|
|||
Printer Names
Is there a way in VBA to loop through and return the full names of available printers? I want to have a table of printers but have VBA be able to loop through the full name list to determine the correct port.
For example, I have a printer "Canon ip7200 series" but I want VBA to be able to find that it is "Canon iP7200 series on Ne08:" Thank you. |
#2
|
|||
|
|||
Code:
'http://www.vbaexpress.com/forum/showthread.php?64826-WSH-to-List-All-Printers Sub M_snb_printers() MsgBox ActivePrinter With CreateObject("Wscript.network") For j = 0 To .EnumPrinterConnections.Count - 1 Step 2 c00 = c00 & vbLf & .EnumPrinterConnections(j + 1) & " on " & .EnumPrinterConnections(j) Next End With MsgBox c00 End Sub |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Printer Listing | hickeyt | Excel Programming | 4 | 04-30-2019 08:44 AM |
Printer Problems-Need to reload printer each day | jekronenfeld | Windows | 1 | 11-24-2014 12:35 AM |
How to enter names in Resource Pool/names | pstein | Project | 1 | 03-26-2012 07:37 AM |
MS Word 2003, printer queue in 'printer properties' shows 1 job; no job in printer | benhuxham | Word | 0 | 07-25-2011 06:58 PM |
2 printer icons | Topazdan | Office | 3 | 05-18-2010 01:35 AM |