Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WORD oWord.ActivePrinter Changes Windows Default Printer
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
WORD oWord.ActivePrinter Changes Windows Default Printer
Miscellaneous
Thread ID:
00397778
Message ID:
00397778
Views:
46
Hi:

I just realized that changing oWord.ActivePrinter to some other printer will change the Default printer in Windows. As a word around, I save the current oWord.ActivePrinter and set it back after PrintOut():

LOCAL lcDefaultPrinter

lcDefaultPrinter = oWord.ActivePrinter
oWord.ActivePrinter = "Some Other Printer"
oDocument.PrintOut()
oWord.ActivePrinter = lcDefaultPrinter

Is there a better way of setting the printer in Automation that does not change the current Windows default printer?

Thanks!
Reply
Map
View

Click here to load this message in the networking platform