Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WORD oWord.ActivePrinter Changes Windows Default Printer
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
WORD oWord.ActivePrinter Changes Windows Default Printer
Divers
Thread ID:
00397778
Message ID:
00397778
Vues:
47
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!
Répondre
Fil
Voir

Click here to load this message in the networking platform