InstalledPrinters Object (Publisher)
Represents the collection of all Printer objects, each of which represents one of the printers installed on the computer.
The following Microsoft Visual Basic for Applications (VBA) macro shows how you can use the PrinterName and IsActivePrinter properties of the Printer object to get a list of all the installed printers on the computer and to determine which of them is currently the active printer.
Public Sub InstalledPrinters_Example() Dim pubInstalledPrinters As Publisher.InstalledPrinters Dim pubApplication As Publisher.Application Dim pubPrinter As Publisher.Printer Set pubApplication = ThisDocument.Application Set pubInstalledPrinters = pubApplication.InstalledPrinters For Each pubPrinter In pubInstalledPrinters Debug.Print pubPrinter.PrinterName If pubPrinter.IsActivePrinter Then Debug.Print "This is the active printer." End If Next End Sub