On 16/3/05 3:56 pm, "Russell" <[EMAIL PROTECTED]> wrote:

> I have a script that automatically creates a subject for a message based on
> the attachment's file name
> 
> I'm trying to add it to a a droplet that will also create a new message with
> certain recipients. My problem is now the code (that creates the subject)
> doesn't seem to work. I'm wondering if Entourage needs a delay before I ask
> it to grab the attachment's file name.
> 
> Here's the code: (the attachment/subject part of the script is at the end)
> 
> Thanks in advance.
> 
> on open ThisItem
>     tell application "Microsoft Entourage"
>         open ThisItem
>         activate
>         with timeout of 600 seconds
>             set theAccount to default mail account
>             --set theSource to source of theMsg
>             set newMsg to make new outgoing message at drafts folder with
>             properties {account:theAccount} --, source:theSource
>             set {window 1's to recipients, window 1's CC recipients} to
>            {"[EMAIL PROTECTED]" & "," & "[EMAIL PROTECTED]" & "," &
>             "[EMAIL PROTECTED]", "[EMAIL PROTECTED]" & "," & "[EMAIL 
> PROTECTED]"}
>         end timeout
>     end tell
>     tell window 1
>         try
>             set attName to name of attachment
>             set subject to my (attName)
>         end try
>     end tell
> end open


There is no name of the attachment because that script doesn't attach the
file to the message! You need to add the line after 'tell window 1'.

Also, no need to set theAccount to the default mail account - making a new
message will automatically use the default account.


-- 
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the All-New Entourage Help Pages? - Check them out:
        <http://www.entourage.mvps.org/>


-- 
To unsubscribe:                     
<mailto:[EMAIL PROTECTED]>
archives:       
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:       
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to