INFO: ActivePrinter Property in Word Sets System Default PrinterID: Q216026
|
When you use the ActivePrinter property in 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.
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:
Set oWord = CreateObject("Word.Application")
oWord.WordBasic.FilePrintSetup Printer:="HP LaserJet 4 on LPT2", _
DoNotSetAsSysDefault:=1
For additional information about the ActivePrinter property, please see the following article(s) in the Microsoft Knowledge Base:
Q162239 Sample Code to Retrieve the Name of the Active Printer
Q177275 WD97: How to Create a Macro to Change Printer or Fax Driver
Additional query words:
Keywords : kbAutomation KbVBA kbWord kbGrpDSO
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: February 9, 1999