706 ofﬁce 2004 for macintosh: the missing manual
To run a script you’ve installed using these steps, select it in the Script menu.
Running the Scripts
Once you’ve installed a script, it’s ready to run. Here’s a quick review of the many
ways you can run an AppleScript script.
• To run an applet, just double-click its icon in the Finder or click it once in the
• To run a droplet, drag and drop ﬁles on it.
• To run a Script menu script, just select it in the menu.
• To run an Entourage script automatically, set up a Rule (page 353) or Schedule
(page 328) to Run AppleScript.
Here are a few short scripts to get you going, with some explanations to follow each.
You can copy them straight from the “Missing CD” page at www.missingmanuals.
com and paste them into Script Editor, or you can type them yourself, being careful
to get all the spelling correct. Click the Compile button in Script Editor to ensure
you’ve made no errors in typing. If styled formatting suddenly appears, you’ve done it
right. If you get an error, ﬁx the line in which the highlighted word appears (often it’s
the word preceding the highlighted one that’s the problem). You can test the scripts
from Script Editor if you wish, as long as you have Entourage or Word set up to go
(for example, a new message window in Entourage, a document with extra carriage
returns in Word).
Save the Entourage and Word scripts as a script. (When you choose File→Save in
Script Editor, that’s what usually appears for the ﬁle format.) Save the Entourage scripts
to the Entourage Script Menu Items folder as described earlier—you’ll ﬁnd them in
Entourage’s Script menu. Save the Word script either to your Home→Library→Scripts
folder or to your hard drive’s Library→Scripts folder, also described earlier, so it will
appear in the Mac’s Script menu. Run your scripts from the appropriate Script menu
by selecting the name there. As for the Excel script, save it as an application; choose
Application from the File Format pop-up menu when saving.
Note: In all the scripts on the following pages, the comments—which appear in italics—have no effect on
the script. They’re just there for human beings to read. In AppleScript, you can make single-line comments
by typing two hyphens (--). Anything following the double-hyphen on that line is a comment. You can make
multi-line (or single-line) comments by enclosing the text within (* asterisk parentheses*). You’ll see both
in the scripts below.
Add BCC (Entourage)
This Entourage email-message script adds a BCC name and address of your choice
to a new message you’re about to send. Perhaps you’re required to BCC your boss
or supervisor on messages to certain people. Instead of having to click in the BCC