Click the Developer tab on the Ribbon and then click the Record Macro button in the Code group.

Wiley

By Doug Lowe with Ryan C. Williams from "Word 2010 All-in-One For Dummies"

A macro is a sequence of commands or keystrokes that Word 2010 records and lets you play back at any time. You can use the macro recorder to create your own customized shortcuts for tasks you do repeatedly.

Remember

After you turn on the macro recorder, it records everything you do in Word — whether you’re typing text, applying formatting, calling up a command, or filling out a dialog box. However, it does not record mouse movements, so you have to use the keyboard for navigating or selecting text while recording a macro.

Warning

Before you go to the effort of recording a macro, ask yourself whether you truly will use the macro often enough to make creating it worthwhile. Fiddling around with macros can be a bit of a time-waster if you’re going to run the macro once in a blue moon.

To record a macro, follow these steps:

1. Plan 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. If you’re planning a macro with five or more steps, think about rehearsing the steps before you record them as a macro.

2. Click the Developer tab on the Ribbon and then click the Record Macro button in the Code group.

The Record Macro dialog box appears:

3. Type the name of the macro you want to create in the Macro Name text box.

The name can be anything you want, but it cannot include spaces, commas, or periods. When the Record Macro dialog box first appears, the macro name is set to something like Macro1 or Macro2, but you can come up with a better name.

Tip

If the function of the macro isn’t obvious from the macro name, you can type a more elaborate description in the Description field of the Record Macro dialog box at the end of the process. You’ll thank yourself later when you forget what the macro does.

4. To make your macro accessible from a toolbar or the keyboard, click the Keyboard or Button button.

If you click the Keyboard button, the Customize Keyboard dialog box appears.

Type the shortcut key combination you want to assign to the macro.

Wiley

Type the shortcut key combination you want to assign to the macro (in this case, Alt+Ctrl+B), click the Assign button, and then click Close.

If you click the Button button instead, the Word Options dialog box appears with the Quick Access Toolbar tab selected where you can create a button to run the macro.

5. Set the Store Macro In drop-down list to the location where you want to store the macro.

The default setting stores the recorded macro in the Normal.dotm template, but you can store in in the document or the current template.

6. Type the keystrokes and Ribbon commands you want to record in the macro.

If you have to stop recording temporarily, click the Pause button. Click it again to resume recording. While on pause, you can call up Word’s Help command, for example.

7. After you finish recording the macro, click the Stop Recording button.

Word adds the macro to the template or document. You’re almost done.

8. Test the macro.

If you assigned the macro to a keyboard shortcut, use the shortcut now to see whether the macro works.

9. Congratulate yourself because you’re finished.