Create a Macro


You can create a macro to save time. A macro combines a series of actions into a single command. For example, you can store in a macro repetitive text that you type frequently so that you can insert it quickly and easily.

You create a macro by recording the keystrokes you use to take the action you want to store in the macro.

image from book

  1. Click Tools.

  2. Click Macro.

  3. Click Record New Macro.

    image from book

    The Record Macro dialog box appears.

  4. Type a name for the macro.

    image from book The default description for the macro appears here.

    image from book

    image from book You can add to the description or type a different description for the macro.

    image from book

  5. Click Keyboard to assign the macro to a keyboard shortcut.

    image from book

image from book

Are there any rules I should follow when naming a macro?

Macro names must begin with a letter and contain no spaces. In addition, if you think you may want to view the macro code, you may find it easiest to locate the macro if you name the macro something meaningful to you.

image from book

Can I assign a macro to a toolbar button?

Yes. In step 5, click Toolbars instead of Keyboard. The Customize dialog box appears. Drag the macro from the Commands list to a toolbar. See the section “Add Buttons to a Toolbar” for details. You can rename the toolbar button by right-clicking it and changing the information in the Name box. Then, complete steps 8 to 10 on the pages that follow.

image from book

image from book

By assigning the macro to a keyboard shortcut, you can quickly and easily run the macro.

image from book

  • The Customize Keyboard dialog box appears.

  1. Press and hold image from book the key and press a letter or number.

    image from book The current assignment for the key combination you selected appears here.

    If anything other than [unassigned] appears, press image from book and repeat step 6 using a different key combination.

  2. Click Assign.

    image from book

    image from book The key combination appears here.

  3. Click Close.

    image from book

    image from book The Stop Recording toolbar appears.

    image from book REC appears in the status bar.

    image from book The mouse image from book changes to image from book.

  4. Perform the actions you want included in the macro.

    image from book

    Note 

    Macros can include typing, formatting, and menu or toolbar commands. You cannot use the mouse to position the insertion point.

    image from book You can click the Pause Recording icon (image from book) to temporarily stop recording and then click the icon again to resume recording.

  5. Click the Stop Recording icon (image from book) when you have taken all the actions you want included in the macro.

    image from book

    Word saves the macro, the Stop Recording toolbar disappears, and REC disappears from the status bar.

image from book

How can I view the macro code?

Follow these steps:

  1. Perform steps 1 to 3 in this section, clicking Macros in step 3.

  2. In the Macros dialog box that appears, click the macro.

  3. Click Edit.

    image from book

    image from book The macro code appears in a Visual Basic window.

    image from book

image from book




Teach Yourself Visually Word 2003
Teach Yourself VISUALLY Word 2003
ISBN: 0764539973
EAN: 2147483647
Year: 2004
Pages: 175
Authors: Ruth Maran

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net