Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ActivePrinter property in Word sets system default printer


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.

↑ Back to the top


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

↑ Back to the top


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

↑ Back to the top


Keywords: kboffice12yes, kbfreshness2006, kbbillprodsweep, kbswept, kboffice2003yes, kbvs2003swept, kbautomation, kbdsupport, kbinfo, kb

↑ Back to the top

Article Info
Article ID : 216026
Revision : 3
Created on : 4/17/2018
Published on : 4/18/2018
Exists online : False
Views : 141