Microsoft KB Archive/28536

Selecting Printer Fonts Box Using Excel Macro Recorder PSS ID Number: Q28536 Article last modified on 02-26-1993 PSS database name: W_eXceL

2.x 3.00 | 2.20 2.21 3.00

WINDOWS | OS/2

Question:

I am using the macro recorder to write a command macro that will change my default font selection and check the Printer Fonts box under the Format..Fonts menu bar. If I use the macro recorder, my font is changed but the Printer Fonts box is not checked. Am I doing something wrong, or is there a command or function to have this box checked?

Response:

You can use the macro recorder to change the default font selected under the Format..Fonts menu bar. However, if you want the Printer Fonts box to be checked, the =Send.keys function must be used.

The following three lines will select the Printer Fonts box:

Excel 3.0
=SEND.KEYS(“%(t,F)”,TRUE) =SEND.KEYS(“%(o,R)”,TRUE) =SEND.KEYS(“~”,TRUE)

Excel 2.x
=SEND.KEYS(“%(t,F)”,TRUE) =SEND.KEYS(“%(o,P)”,TRUE) =SEND.KEYS(“~”,TRUE)

Please note that if this macro is run a second time, it will deselect the Printer Fonts box.

Copyright Microsoft Corporation 1993.