Loop through all printer : Printer « Windows API « VBA / Excel / Access / Word






Loop through all printer

 

Sub TestPrinter()

    Dim prtAvailPrinters As Printer
    For Each prtAvailPrinters In Application.Printers
        With prtAvailPrinters
            Debug.Print "Printer name: " & .DeviceName & "Printer driver: " & .DriverName
        End With
    Next prtAvailPrinters
End Sub

 








Related examples in the same category

1.The Printer Object
2.The Printers Collection
3.Get default printer information
4.Modify Printer Settings