Word Macros Guides

advertisement
Creating and Using a Macro
with Microsoft Word
What is a macro?
Microsoft Word offers the power to create macros. A macro is a tool that enables you to
assign repetitive tasks to new toolbar buttons or keystroke combinations. An analogy may
make macros easier to understand. If you have an answering machine attached to your
telephone, you want it to complete the same series of tasks each time you are unavailable to
answer your telephone: play back your message, record any incoming message, and then
store that message until you are ready to play it back. In this situation, you want to record
your greeting message once and have your machine play back the message whenever you are
away. A computer macro is similar: you “record” it once and then “play it back” whenever
you need it.
The power to create macros is like having a recorder built into your computer. You tell the
program that you want to create a macro, and then you assign a designated alphanumeric
key to use later with the Ctrl key when you want to make use of the macro. When you record
a macro, the program stores your subsequent keystrokes and “remembers” them later when
you execute the designated Ctrl key command sequence. Macros are great time-saving tools.
Selecting the Record a New Macro command
Launch Microsoft Word and begin a new document. Use the mouse to click on the Record a
new Macro choice from the Macro option under the Tools command on the menu bar (see
below). In a few moments you will see the Record a new Macro dialog box appear on your
screen (see on the next page).
Creating a new macro: Toolbar Button or Keystroke
When you see the Record a new Macro dialog box (see below), type in a name for your new
macro (such as Signature) and then select either Toolbars or Keyboard. If you select the
Toolbars option, you will create a new toolbar button for the macro you are creating. If you
select the Keyboard option, you will assign a new keystroke combination (such as Command +
S) to the macro you are creating.
If you select the Toolbars option, your next step is to create a new toolbar button for your
macro. After you click on the Toolbars button, you will see the Customize dialog box (see
below) appear on your screen. Click and drag the Toolbar icon in the Commands window
(called Normal.NewMacros.Macro1 in the screen print shown below ) and place it somewhere
on your existing toolbar.
Once the new Toolbar icon is on your toolbar, click on it and select the Modify Selection
option on the Customize dialog box (see the next page). This dialog box lets you modify the
toolbar button you will use to activate your new macro. You can delete the toolbar button,
change its name, add an icon to it, and other activities using this dialog box (see next page).
To change the name of the macro as displayed on the toolbar button, highlight the current
name and type over a short, representative name you would prefer (see the changed name
New illustrated on the next page).
J. F. Beaver
Page 2
Macros
To add an icon to the toolbar button, drag down to the Change Button Image option and
then select the icon (see below) that you would prefer to have assigned to your new macro
toolbar button.
If you select the Keyboard option, your next step is to assign a keystroke combination to your
macro. After you click on the Keyboard button, you will see the Customize Keyboard dialog
box (see the next page) appear on your screen. Press a combination of keystrokes (such as
the Control key + the letter S as illustrated on the next page) to assign that combination of
keys to your macro. After you have selected the keystroke that you want assigned to your
macro, click on the Assign button and then click on the Close button (see the next page) to
begin recording your macro.
J. F. Beaver
Page 3
Macros
Recording a text macro
When you see the Macro control buttons on your screen (see below), you are ready to record
your new macro. You will use the left hand button (Stop) to stop recording your macro when
you are finished and the right hand button (Pause) if you want to pause and resume while
recording your macro.
Type in your address information exactly as you would in a word processed document. Here
is an sample:
Dr. John F. Beaver
321-D Bacon Hall
Buffalo State College
1300 Elmwood Avenue
Buffalo, NY 14222
USA
Remember to press the Return or Enter key at the end of each line. When you have finished
entering the text, press the Stop button on the Macro control buttons.
Using your macros
After you have pressed the Stop button on the Macro control buttons, your new macro
should be ready to use.
1. If you assigned the macro to a toolbar button, simply click on that button to have the
macro type the text you entered.
2. If you assigned the macro to a keyboard combination, simply press that combination
of keys to have the macro type the text you entered.
Macros are not associated with any particular document, so they can be used in any word
processed document that you wish. Create macros for any text that you use frequently.
J. F. Beaver
Page 4
Macros
Download