G
Guest
Hi, I want to list the printers and their ports using the following...
If printerList.Count > 0 Then
For Each ptr In printerList
ptrName = ptr.DeviceName
ptrPort = ptr.Port
spBarCodePrinter = spBarCodePrinter & """" & ptrName & """;" &
"""" & ptrPort & """;"
DoEvents
Next ptr
End If
The above code loops each printer to build a list of printer names and
ports. Unfortunitely the list shows the same printer port for all printes
(which is not the case).
Why is it that each printer is correctly listed and not each printer's port?
Any ideas or suggestions to build a correct list is appreciated
Many thanks
Jonathan
If printerList.Count > 0 Then
For Each ptr In printerList
ptrName = ptr.DeviceName
ptrPort = ptr.Port
spBarCodePrinter = spBarCodePrinter & """" & ptrName & """;" &
"""" & ptrPort & """;"
DoEvents
Next ptr
End If
The above code loops each printer to build a list of printer names and
ports. Unfortunitely the list shows the same printer port for all printes
(which is not the case).
Why is it that each printer is correctly listed and not each printer's port?
Any ideas or suggestions to build a correct list is appreciated

Many thanks
Jonathan