Recorded Macro Does Not Retain Printer Selection

Last reviewed: August 4, 1997
Article ID: Q113240
6.00 6.00a WINDOWS kbusage kbmacro

The information in this article applies to:

  • Microsoft Word for Windows, versions 6.0, 6.0a

SYMPTOMS

When you record a macro in Word 6.0 for Windows, it does not retain the current Printer setting. The only time Word records the Printer setting is when you choose the Set As Default Printer button in the Printer Setup dialog box. This differs from Word 2.x functionality, in which the macro recorder does retain the Printer setting, even when you do not switch to a different default printer.

CAUSE

By design, Word 6.0 always uses the default Windows printer driver, so the macro recorder does not record information about the printer driver unless you change to a different default printer.

WORKAROUND

If you want your Word macro to print using a specific printer driver, use the FilePrintSetup command. To record this macro, turn on the macro recorder and perform the following steps.

Note: This workaround resets your default Windows printer setting.

  1. From the File menu, choose Print.

  2. Choose the Printer button.

  3. In the Printers list, select the printer you want to use and then choose the Set As Default Printer button.

  4. Choose the Close button in the Printer Setup dialog box.

  5. Select the formats you want in the File Print dialog box, and then choose OK to print.

  6. Turn off the macro recorder.

The following is a sample recorded macro that switches to a specific Printer setting and then prints the document:

 Sub MAIN
  FilePrintSetup .Printer = "HP LaserJet 4Si/4Si MX on LPT1:"
  FilePrint .AppendPrFile = 0, .Range = "0", .PrToFileName = "", \
   .From = "", .To = "", .Type = 0, .NumCopies = "1", .Pages = "", \
   .Order = 0, .PrintToFile = 0, .Collate = 1, .FileName = ""
 End Sub

Kbcategory: kbusage kbmacro KBSubcategory:


Additional reference words: 6.00 6.00a missing winword word6
Version : 6.00 6.00a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 4, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.