Se connecter avec Microsoft
S'identifier ou créer un compte.
Bonjour,
Sélectionnez un autre compte.
Vous avez plusieurs comptes
Choisissez le compte avec lequel vous voulez vous connecter.
Anglais
Désolé... Cet article n’est pas disponible dans votre langue.

Summary

When you use the ActivePrinter property in Microsoft Office Word to set the current printer, you also set the printer you select to be the default printer for the system. If you do not want to change the setting for the default system printer, do not use the ActivePrinter property.

More Information

To select a new printer without having Word change the default system printer, use the WordBasic FilePrintSetup method with the DoNotSetAsSysDefault flag set to True. For example, instead of using the following code:

   Set oWord = CreateObject("Word.Application")
oWord.ActivePrinter = "HP LaserJet 4 on LPT2"

Use the following code.

   Set oWord = CreateObject("Word.Application")
oWord.WordBasic.FilePrintSetup Printer:="HP LaserJet 4 on LPT2", _
DoNotSetAsSysDefault:=1

References

For more information about the ActivePrinter property, click the following article numbers to view the articles in the Microsoft Knowledge Base:

162239 Sample code to retrieve the name of the active printer

177275 How to create a macro to change printer or fax driver

Besoin d’aide ?

Vous voulez plus d’options ?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Ces informations vous ont-elles été utiles ?

Qu’est-ce qui a affecté votre expérience ?
En cliquant sur Envoyer, vos commentaires seront utilisés pour améliorer les produits et services de Microsoft. Votre administrateur informatique sera en mesure de collecter ces données. Déclaration de confidentialité.

Nous vous remercions de vos commentaires.

×