Re: Adding an attachment to Entourage
Re: Adding an attachment to Entourage
- Subject: Re: Adding an attachment to Entourage
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 02 Feb 2003 22:35:17 -0800
On 2/2/03 6:28 PM, "Frangois Guiti" <email@hidden> wrote:
>
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?
The attachment "property" (it's actually a list of elements which is coerced
to behave like a property you can set) has to specify its own 'file'
property for each attachment element. That's what you set to 'theAttachment'
(after all, there can be lots of attachments, you need to be able to specify
each one). Like this:
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:{file:theAttachment}}
else
set theMSG to make new draft window with properties {to
recipients:studentMAILTO, subject:studentSUBJECT, content:studentCONTENT}
end if
end tell
By the way, why make a draft window on the screen since you seem to have
everything you need? Or will you be adding more content manually? If not,
make an outgoing message (in the out box, or drafts folder), not a draft
window, so you can send it without ever needing to see it open u. It's
harder to set recipients of an outgoing message, however, unless there's
only one recipient. Write back if you need help with it.
--
Paul Berkowitz
_______________________________________________
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.