Microsoft KB Archive/216026

= ActivePrinter property in Word sets system default printer =

Article ID: 216026

Article Last Modified on 5/11/2007

-

APPLIES TO


 * Microsoft Office Professional 2007
 * Microsoft Office Professional Edition 2003
 * Microsoft Office XP Developer Edition
 * Microsoft Office 2000 Developer Edition
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q216026



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

