O'Reilly logo

Office X for Macintosh: The Missing Manual by David Reynolds, Tonya Engst, Nan Barber

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

270 office x for macintosh: the missing manual
Again, Excel spreadsheets, FileMaker databases, and tab-delimited text files are
fair game. If you haven’t set up your database yet, choose New Data Source and
follow the steps on page 256.
7. Drag eld names from the Merge Field panel of the Data Merge Manager into
the address box of the envelope in the main document.
Add spaces and line breaks in the usual way, as shown in Figure 6-32.
8. Prepare your printers feed for envelopes; click MergeMerge to Printer. Click
Print.
If the envelope gods are smiling, your printer now begins to print the envelopes
perfectly. (If they’re not, then you may discover that you’ll have to rotate the
envelopes in the paper slot, for example.) Depending on your printer model, you
may have to print one envelope at a time—if so, choose Current Record from the
drop-down menu at the bottom of the Data Merge Manager.
Working with Macros
A macro is like a script: a step-by-step series of commands that Word performs,
rapid-fire, each time the macro is run. Although they definitely qualify as a power-
user feature, you should consider this feature any time you find yourself facing a
repetitive, tedious editing task. For example:
Figure 6-34:
Choose the desired
name and address
from your Entourage
address book, then
click Insert as shown.
Close the Address
Book to return to the
Envelope dialog box,
where you can
format the envelope.
Data Merges
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 finished).
Drawing a table with the months of the year automatically listed down the first
column and the names of all salespeople across the top. (All you have to do to
complete the daily sales report is fill in the figures.)
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-
pany intranet).
Offices 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 youve recorded the macro in this way, Word is ready to execute
those actions automatically, like a software robot thats wired on caffeine.
Tip: A macro is saved into a document or a template. Thereafter, it works only when youve 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 theyre 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 cant 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 youd 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
MacroRecord 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-
ure 6-35.
Working
with Macros

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required