Article ID: 177275
Article Last Modified on 1/22/2007
Sub SwitchPrinter()
Dim strActivePrinter As String
' Get active printer.
strActivePrinter = Application.ActivePrinter
' Change to the Microsoft Fax printer driver.
Application.ActivePrinter = "Microsoft Fax"
' Print the active document to Fax.
ActiveDocument.PrintOut
' Change back to the default printer.
Application.ActivePrinter = strActivePrinter
End Sub
Note: If you run this macro and specify a printer that is not installed,
you will receive the following error message:
122709 How to Create a Macro to Change Printer or Fax Driver
176476 OFF: Office Assistant Not Answering Visual Basic Questions
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: wordcon vba
Keywords: kbcode kbhowto kbmacroexample kbprogramming KB177275