chapter 6: advanced word processing 271
• Changing three different character names in one pass (which is required for each
chapter of the novel you just ﬁnished).
• Drawing a table with the months of the year automatically listed down the ﬁrst
column and the names of all salespeople across the top. (All you have to do to
complete the daily sales report is ﬁll in the ﬁgures.)
• Saving the table document above as a Word document in your Sales folder and
saving an additional copy as a Web page (which you can now upload to the com-
Ofﬁce’s macros are actually tiny programs written in a programming language called
Visual Basic. People with programming skills and a lot of time on their hands can
make Visual Basic do astounding tricks; fortunately, you don’t need to learn the
language. You can generally get away with using Word’s macro recorder, a “watch
me” mode where Word writes the macro for you as you traverse the various steps
once yourself. Once you’ve recorded the macro in this way, Word is ready to execute
those actions automatically, like a software robot that’s wired on caffeine.
Tip: A macro is saved into a document or a template. Thereafter, it works only when you’ve opened that
same document (or a document based on that template).
To make a macro available in all Word documents, move it into the Normal template, as described under
“The Organizer” on page 207. Fortunately, macros you create by recording are stored in the Normal
template, so they’re always available.
Creating a Macro
Even without knowing Visual Basic, you can create a macro for anything you know
how to do in Word. Think of the macro recorder as a tape recorder that “listens” to
what you do, and then replays it on command.
Note: The macro-recording feature in Word can’t record mouse movements (other than menu selections
and button clicks); so if your macro involves selecting text or moving the insertion point on the page, do
it using keyboard shortcuts.
In this example, the company you work for has been sold, and you’d like to create a
macro that goes through a document and replaces the old company name with the
new one. Because you’ll have to do this on dozens or hundreds of existing docu-
ments, you decide to store it as a macro that you can trigger at will.
1. Open a document that needs your Find/Replace surgery. Choose Tools→
Macro→Record New Macro.
Alternatively, click to turn on the REC button on the bottom edge of your docu-
ment window. The Record Macro dialog box opens, as shown at bottom in Fig-