Adding an attachment to Entourage
Adding an attachment to Entourage
- Subject: Adding an attachment to Entourage
- From: François Guité <email@hidden>
- Date: Sun, 02 Feb 2003 21:28:51 -0500
I thought this would be pretty straightforward, but nothing ever seems as
such to someone who only dabbles with AppleScript when the need arises.
I have a script that works just fine for sending an Entourage message to a
number of my students, from a FileMaker Pro database. Lately, I've tried to
add a few lines to attach a file after a message prompt, but only with the
first message sent out (I definetely don't want to deal with the prompt for
each message in the group e-mail). To no avail. The script goes perfectly
when run several times in a row from Script Editor, but not in a FileMaker
loop.
Here are the added lines that are causing me a headache :
tell application "FileMaker Pro"
set fileCHOSEN to cell "Name of cell" of current record -- yields
"chosen" after the first message prompt
set attachmentOPTION to cell "Attachment" of current record -- true
yields "Attachment" ; false yields "" (global field)
end tell
if fileCHOSEN is not "chosen" then
set optionPROPERTIES to ""
set theAttachment to ""
end if
if attachmentOPTION is "Attachment" then
if fileCHOSEN is not "chosen" then
set theAttachment to choose file with prompt "Choose document"
set optionPROPERTIES to "activate attachment"
end if
end if
tell application "Microsoft Entourage"
activate
if optionPROPERTIES is "activate attachment" then
set theMSG to make new draft window with properties {to
recipients:studentMAILTO, subject:studentSUBJECT, content:studentCONTENT,
attachment:theAttachment}
end if
if optionPROPERTIES is not "activate attachment" then
set theMSG to make new draft window with properties {to
recipients:studentMAILTO, subject:studentSUBJECT, content:studentCONTENT}
end if
end tell
Would someone be so kind as to help me with this?
Frangois
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.