How to Create a Macro to Change Printer or Fax DriverLast reviewed: February 5, 1998Article ID: Q122709 |
The information in this article applies to:
SUMMARYThis article describes how to create a macro that allows you to send a document to a specific printer or fax device and then resets the printer to the original default. If you have several printers or if you want to switch between a printer and a fax driver, create multiple macros.
MORE INFORMATIONThe following macro example selects the "HP LaserJet IIISi on LPT1:" and then returns you to your default printer.
Sub MAIN 'Retrieve and set information about the current default printer Dim FPS As FilePrintSetup GetCurValues FPS 'Set the default Printer DefaultPrinter$ = FPS.Printer FilePrintSetup .Printer = "HP LaserJet IIISi on LPT1:" 'Send the document to the currently selected printer FilePrint 'Reset to the original default printer FilePrintSetup .Printer = DefaultPrinter$ End SubIf you have more than one printer, you can create one macro for each printer and change the name of the printer to reflect the printer you are using. Make sure the text exactly matches the printer description. To obtain this information, click Print on the File menu and then choose the Printer button. To create the macro:
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
REFERENCES"Microsoft Word Developer's Kit," version 6.0, page 439
|
KBCategory: kbprg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |