Link to home
Start Free TrialLog in
Avatar of TeDeSm
TeDeSm

asked on

Printing Word document to specific printer sets that printer as default!

I am using the attached code to print a Word document to a specific printer. The document prints OK however the current system default printer is changed by the code making the printer the document is output to as the default.

Is there something I need to do to ensure the system default printer remains as such and still be able to send the document to another printer?
oWord.ActivePrinter = "Zetafax Printer"
With oWord
  Try
    'Print the Word document.
    oWord.ActiveDocument.PrintOut(True, True)
  Catch exc As Exception
    MessageBox.Show(exc.Message)
  End Try
End With

Open in new window

SOLUTION
Avatar of dlc110161
dlc110161
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TeDeSm
TeDeSm

ASKER

Capturing the default current printer worked and could be usefull, however the Microsoft KB216026 was a better solution.