Printer Driver List in Excel

mroseto

Board Regular
Joined
Jul 18, 2002
Messages
203
Hello all,

I was wondering if there is a way to get a list of print drivers installed on a computer and have it exported to excel? I know this is an unusual request and might not be doable It will just save me from having to write down a long list of printers installed on my server.

Thanks

Mike
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Do you mean a list of installed printers, or a list of driver files?
 
Upvote 0
You can use WMI - for example:
Code:
Sub ListPrinters()
Dim strComputer As String, objWMIService As Object, colInstalledPrinters As Object, objPrinter As Object
Dim lngrow As Long
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer")
For Each objPrinter In colInstalledPrinters
   lngrow = lngrow + 1
   ActiveSheet.Cells(lngrow, "A").Value = objPrinter.Name
Next objPrinter
End Sub
 
Upvote 0

Forum statistics

Threads
1,203,453
Messages
6,055,532
Members
444,794
Latest member
HSAL

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top