Recorded Macro Does Not Retain Printer Selection

ID: Q113240

6.00 6.00a WINDOWS kbusage kbmacro

The information in this article applies to:

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

Last Reviewed: August 4, 1997