Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 09-02-2019, 03:13 PM
hickeyt hickeyt is offline Printer Names Windows 10 Printer Names Office 2007
Printer Names
Join Date: Apr 2019
Posts: 6
hickeyt is on a distinguished road
Default 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.
Reply With Quote
Old 09-02-2019, 06:48 PM
Kenneth Hobson Kenneth Hobson is offline Printer Names Windows 10 Printer Names Office 2016
Advanced Beginner
Join Date: Jun 2018
Posts: 37
Kenneth Hobson is on a distinguished road

Sub M_snb_printers()
  MsgBox ActivePrinter

  With CreateObject("")
    For j = 0 To .EnumPrinterConnections.Count - 1 Step 2
      c00 = c00 & vbLf & .EnumPrinterConnections(j + 1) & " on " & .EnumPrinterConnections(j)
  End With
  MsgBox c00
End Sub
Reply With Quote

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
Printer Names 2 printer icons Topazdan Office 3 05-18-2010 01:35 AM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 07:18 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd. is not affiliated with Microsoft