I have a beautiful script, written by the brilliant Bryan Harris (with
Paul B's help) that I've used for over 5 years. And I use it virtually
every hour I'm in front of the computer. It's called Open Template (I
call it exactly "Open Template! \cT" so that Control-T activates it).
You first create a new Folder, called "Templates" on the root level of
your Folders. In it, you can place any plain or formatted emails that
you might want to use over and over, as boilerplate texts.
By running the script, it brings up a little separate window that
lists, numerically, each of the emails templates that you have placed
in your Templates folder. You select the one you want, click OK, and
there you have it. I use it for customer orders, responses to
commonly-asked questions, etc.
NOTE: its only glitch is that it doesn't remember which "From" email
I've used. It always reverts to my default email address. So if any
scripter can figure out how to get it to maintain the From email that
one uses for the original template, that would be, as they say,
"sweet."
-- Open Template 1.4
-- script by Bryan Harris,
[email protected], 22 February 2001
-- special thanks to Paul Berkowitz,
[email protected]
-- This script allows the user to select a template
-- from the "Template" folder (at the root folder level).
-- v1.4 is a minor speed update and now allows bccs in templates
(2/22/01)
-- v1.3 fixes a problem where certain messages were uneditable
-- when used as templates. If you open a template message
-- and change your mind about sending it, remember to erase
-- it from the Drafts folder. (1/20/01)
tell application "Microsoft Entourage"
activate
with timeout of 600 seconds
try
set theMsgs to (every message of folder "Templates")
on error
display dialog "Can't find a \"Templates\" folder. This script
requires that there be a folder named \"Templates\" at the root folder
level with messages in it to be used as templates." with icon stop
return
end try
set theCount to count of theMsgs
if theCount is 0 then
display dialog "There are no templates in the \"Templates\" folder.
Please drag at least one message to that folder to use this script."
with icon stop
return
end if
set theSubs to {}
repeat with i1 from 1 to theCount
set theSubs to theSubs & (i1 & ". " & subject of (item i1 of
theMsgs) as string)
end repeat
set theTemp to (choose from list theSubs with prompt "Select a
template:" without multiple selections allowed and empty selection
allowed)
if theTemp is false then return
set theTemp to (theTemp as string)
set i2 to (text 1 through ((offset of "." in theTemp) - 1) of
theTemp) as integer
set theMsg to item i2 of theMsgs
set theSource to source of theMsg
set theAccount to default mail account -- or account of theMsg, as
you prefer
-- get bcc recipients (Entourage apparently does not include these
with the source)
set numRecips to (count of recipients of theMsg)
set bccRecips to ""
repeat with i2 from 1 to numRecips
if recipient type of recipient i2 of theMsg is bcc recipient then
set bccRecips to bccRecips & (display name of address of recipient
i2 of theMsg) & " <" & (address of address of recipient i2 of theMsg) &
">,"
end if
end repeat
set newMsg to make new outgoing message at drafts folder with
properties {account:theAccount, source:theSource}
open newMsg
tell window 1 to set BCC recipients to bccRecips
-- remove the two hyphens at the beginning of the following line if
you'd like the To:, Cc, and Bcc fields cleared when you open the
template
-- tell window 1 to set {to recipients, CC recipients, BCC
recipients} to {"", "", ""}
end timeout
end tell