Datasheet
Book IX
Chapter 1
Recording and
Using Macros
Doing the Macro Recorder Dance
559
recorder, anything you do in Word — whether you’re typing text, applying
formatting, calling up a command, or filling out a dialog box — is carefully
recorded.
Then when you turn off the recorder, you can replay the recorded macro to
repeat the exact sequence of steps that Word recorded in the macro.
About the only things that are
not recorded by the macro recorder are
mouse movements within the document. The macro recorder records but-
tons or Ribbon choices you click, but Word won’t let you navigate about
your document or select text with the mouse while the macro is recording.
As a result, use the keyboard for navigating or selecting text while recording
a macro.
To record a macro, follow these steps:
1. Try to talk yourself out of it.
Fiddling around with macros can be a bit of a time-waster. Ask yourself
whether you really will use the macro after you go to the trouble of
recording it. If not, go directly to Step 12.
2. Think about what you’re going to do.
Think through all the steps you have to follow to accomplish whatever
task you want to automate with a macro. To create a macro that makes
text bold and italic, for example, all you have to do is press Ctrl+B and
then press Ctrl+I. That’s a pretty simple macro, but other macros can be
much more complex, involving dozens of steps. If necessary, rehearse
the steps before you record them as a macro.
3. Click the Developer tab on the Ribbon and then click the Record
Macro button in the Code group.
The Record Macro dialog box appears, as shown in Figure 1-1.
Figure 1-1:
The Record
Macro
dialog box.
50_040584 bk09ch01.qxp 12/28/06 9:28 PM Page 559