Forum Discussion
2 Replies
Sort By
- Jackson_LContributor
Hello,
You can use WMI to retrieve information on the connected printers. Then do a string compare or the like to determine if your printer is found.
eg. To list printer details:
Sub Printers()
strComputer = "."
strQuery = "Select * From Win32_Printer"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colPrinters = objWMIService.ExecQuery(strQuery)
For Each objPrinter in colPrinters
strResult = objPrinter.Name
If objPrinter.Default Then
strResult = strResult & " - (Default)"
End If
If objPrinter.Local Then
strResult = strResult & " - Local Printer"
Else
strResult = strResult & " - Network Printer"
End If
Log.Message(strResult)
Next
End Sub
Cheers,
Jackson - sastoweSuper ContributorPerfectness. Thanks.
Related Content
- 12 years agokirk_bottomley
- 10 years agonastya_e
- 11 months agoIrinaManea
Recent Discussions
- 3 days agoMW_Didata