706 office 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. Heres 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
Dock
To run a droplet, drag and drop files 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.
Starter Scripts
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, fix 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 FileSave in
Script Editor, thats what usually appears for the file format.) Save the Entourage scripts
to the Entourage Script Menu Items folder as described earlier—you’ll find them in
Entourages Script menu. Save the Word script either to your HomeLibraryScripts
folder or to your hard drives LibraryScripts 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 youre about to send. Perhaps youre required to BCC your boss
or supervisor on messages to certain people. Instead of having to click in the BCC
Installing and
Running Scripts

Get Office 2004 for Macintosh: The Missing Manual now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.