10 Minute Guide to Word for Windows 95

Previous chapterNext chapterContents


- 31 -
Saving Time with Macros

In this lesson, you'll learn how to use macros to speed up your editing tasks.

What Is a Macro?

A macro is a sequence of commands and keystrokes that has been recorded and saved by Word for Windows. You can easily play back a macro at any time, achieving the same result as if you had entered each command and keystroke individually. For example, you could create a macro that:


Timesaver Tip: Why Macros? Macros save time. By recording frequently needed command sequences as macros, you can save time and reduce errors.

The Word for Windows macro is a complex and powerful feature. The basics you'll learn in this lesson will enable you to create many useful macros.

Recording a Macro

The simplest way to create a macro is to enter the keystrokes and commands yourself while Word for Windows records them. The only operations that Word for Windows cannot record are mouse editing actions. That is, a macro cannot record the mouse moving the insertion point or selecting text; you must use the keyboard for these actions while recording a macro. Other mouse actions, such as selecting menu commands or dialog box options, can be recorded in a macro.

To record a macro:

1. Plan the macro. You should try a procedure out before recording it in a macro to ensure that it works the way you want it to.

2. Select Tools Macro to display the Macro dialog box, which is shown in Figure 31.1

Figure 31.1
The Macro dialog box.

3. Type the macro name in the Macro Name text box. The name should describe the actions of the macro. Use any characters except spaces, commas, and periods in the macro name.

4. Select Record to display the Record Macro dialog box (see Figure 31.2).

Figure 31.2
The Record Macro dialog box.

5. In the Description box, enter a short description of the macro. Entering a description is optional, but recommended.

6. If the document is based on a template other than NORMAL, you can pull down the Make Macro Available To list and select All Documents (if you want the macro available to all documents) or Documents based On... (if you want the macro available only to documents based on the current template).

7. Select OK. Word starts recording the macro. While recording is in progress, Word displays the Macro Toolbar in a corner of the document. Additionally, the REC indicator is displayed in the status line at the bottom of the screen, and the mouse pointer changes to a recorder symbol to remind you to use the keyboard, not the mouse, to select text and move the insertion point (see Figure 31.3).

Figure 31.3
Recording is in progress.

8. Execute the actions and commands that you want in the macro. During recording you can click the Pause button on the Macro Toolbar if you want to perform actions that you don't want recorded in the macro. Click Pause again to resume recording. When finished, click the Stop button on the Macro Toolbar to terminate macro recording and store the macro.


Timesaver Tip: Quick Start Double-click the REC indicator on the status line to start or stop recording a macro.

If you make a mistake while recording a macro, select Edit Undo or press Ctrl+Z to undo the mistake. Then continue recording the rest of the macro as usual.

Playing Back a Macro

You can play back any macro at any time while you're working on a document, as follows:

1. Select Tools Macro. The Macro dialog box appears (Figure 31.4).

Figure 31.4
Choose a macro to run in the Macro dialog box.

2. Type the name of the macro in the Macro Name box, or highlight the name in the list.

3. Select Run. The chosen macro is executed.

Assigning a Shortcut Key to a Macro

If you assign a shortcut key to a macro, you can play the macro back simply by pressing its shortcut key. The shortcut keys are really key combinations; you can select from the following (where key is a letter, number, function, or cursor movement key):

Shift+key

Ctrl+key

Alt+key

Alt+Ctrl+key

Alt+Shift+key

Ctrl+Shift+key

Ctrl+Shift+Alt+key

To assign a shortcut key to a macro, follow these steps:

1. Select Tools Customize to display the Customize dialog box.

2. If necessary, click the Keyboard tab to display the keyboard options (figure 31.5).

Figure 31.5
Use the Customize dialog box to assign a shortcut key to a macro.

3. Scroll through the Categories list until the Macros entry is highlighted.

4. In the Macros list, highlight the name of the macro that you want to assign a shortcut key to.

5. Press Alt+N to move to the Press New Shortcut Key box.

6. Press the shortcut key combination that you want to assign. Its description is displayed in the Press New ShortCut Key box.

7. Under Currently Assigned To, Word displays the name of the macro or command that the selected shortcut key is assigned to, or (unassigned) if there is no assignment.

8. If the shortcut key is unassigned, select Assign to assign it to the macro. If it is already assigned, press BackSpace to delete the shortcut key display and return to step 6 to try another key combination.

9. When done, select Close.


Timesaver Tip: Shortcut Keys Assign a shortcut key to macros that you will use frequently. To play the macro, simply press the shortcut key while editing the document.

In this lesson, you learned how to use macros to automate your work. This is the last lesson in the book, and you should now be ready to handle just about any word processing task thrown at you. I suggest that you keep this book near your computer so you can refer to it as needed. Don't lend it to anyone--they can buy their own copy!


Previous chapterNext chapterContents


Macmillan Computer Publishing USA

© Copyright, Macmillan Computer Publishing. All rights reserved.