Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
List of printers
Hi
I'd like to get a array of all installed printers incl. the connected port. The array should look like this: HP LaserJet 6P on LPT1: Adobe PDF on Ne03: SnagIt 6 on Ne00: I already have the following procedure, but this code doesn't return the connected port: Private Sub ListPrinters() Dim wshNetwork As Object Dim oDrives As Object Dim oPrinters As Object Dim iCount As Integer Dim sCurrentprinter As String sCurrentprinter = Application.ActivePrinter Set wshNetwork = CreateObject("WScript.Network") Set oDrives = wshNetwork.EnumNetworkDrives Set oPrinters = wshNetwork.EnumPrinterConnections For iCount = 0 To oPrinters.Count - 1 Step 2 Debug.Print oPrinters.Item(iCount + 1) Next End Sub Many thanks in advance. Tom |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
List of available printers | New Users to Excel | |||
list o installed printers | Excel Programming | |||
How to get the available printers list in a macro | Excel Programming | |||
Creating a printers list | Excel Programming | |||
List of Printers | Excel Programming |