Printers & LPT
Hi
With the following script I can see all printers:
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
MsgBox oPrinters.Item(iCount + 1)
Next
End Sub
Now I'd like to know to which port (LPT) the printers are connected. How to
do?
Tom
|