The information in this article applies to:
SUMMARYIn Microsoft Excel, you can use the following Visual Basic, Applications Edition, macros to change the paper source on the Hewlett-Packard (HP) LaserJet 4/4M to the lower tray. Sample MacrosMicrosoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.To send key commands to the Printer Setup dialog box, use the following code:
In order to use this Macro with a shortcut key, you must put a wait
statement before the Application.ActivePrinter line. The wait may have to
be adjusted depending on the system environment. For example, to make the
macro wait one second, use the following line of code:
The following is an explanation of the string used in the SendKeys
function:
To set the paper source, and then set it back to Auto Select, use the
following code:
MORE INFORMATION
In the Printer Setup dialog box, there is no accelerator key combination
that will directly select a paper source such as lower tray. Instead, the
arrow key should be used to select from the list of available sources. For
example, on the HP LaserJet 4/4M there are six possible choices for the
paper source:
NOTE: This macro may work for other printers or may require a different sequence of keystrokes depending on the printer driver. REFERENCES"Visual Basic User's Guide," version 5.0, Chapter 6 Additional query words: print
Keywords : kbprg |
Last Reviewed: October 18, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |