Using a Macro to Select Font CartridgesLast reviewed: September 2, 1997Article ID: Q60326 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, the procedure that you use to change your font cartridge with a macro is not the same in Microsoft Windows/386 and Microsoft Windows versions 3.0 and 3.1. Microsoft Windows versions 3.0 and 3.1 use a Control Panel that is different than the one used in Microsoft Windows/386. Because of this, the macro that you use for Microsoft Windows/386 is slightly different than the macro that you use for Microsoft Windows versions 3.0 and 3.1.
MORE INFORMATIONThe information below makes the following assumptions:
Visual Basic Procedure
Sub Cartridge_Macro() ' Value in quotation marks should be replaced with ' the desired printer that appears in the Printer Setup dialog box Application.ActivePrinter = "HP LaserJet Series II on LPT1:" Application.SendKeys "%(f)(p)(r)%(s)%(t)(a){032}(b){032}~~{esc}" End Sub Microsoft Excel version 4.0 Macro
A1: CartridgeMacro A2: =SEND.KEYS("%(s)%(t)(a){032}~~") A3: =PRINTER.SETUP?() A4: =RETURN()If you open your Printer Setup dialog box after running this macro, you will see that cartridge "A" is selected. To select a cartridge other than "A", use the letter of that cartridge in place of "A". The "{032}" is the ASCII code sequence for the SPACEBAR. To select two cartridges, modify the SEND.KEYS() line read
=SEND.KEYS("%(s)%(t)(a){032}(b){032}~~")where "b" is the second cartridge selected. Additional Query Words: 2.00 2.01 2.10 3.00 4.00 5.00 Keywords : kbcode kbmacro kbprg Version : 2.x 3.00 4.00 5.00 Platform : WINDOWS |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |