Title: Re: Attachments
On or near 8/2/2002 10:55 AM, Marc Lambert at [EMAIL PROTECTED] observed:

> Greetings everyone. Does there happen to be any way to forward an email
> without attachments but with some indication of their filenames? I sometimes
> need to forward myself an email that I sent in order to keep track of my
> correspondence, but don’t want to resend the attachments, esp from the road.
> Currently I manually type in the filenames above the forwarded message and
> it would be nice to have this automated somehow. Thanks.
>
I wrote this script to insert the list of attachments into a message. It inserts the list at the end of the message; you could edit the third from  last line and just reverse the order of the elements in it.

Like this:

            set the content of theMsg to (theList & return & the content of theMsg)


tell application "Microsoft Entourage"
    set isDraft to the class of the front window is draft window
    if isDraft then save the front window
    try
        set theMsg to item 1 of (get current messages)
    on error
        display dialog "You must select one message."
        return
    end try
    set theSub to subject of theMsg
    try
        set nList to name of attachments of theMsg
    on error theErr number theNum
        if theNum = -1728 then
            display dialog "Message has no attachments to list."
            return
        else
            display dialog "#" & theNum & ":" & theErr
        end if
    end try
    if isDraft then close the front window
    if (count nList) > 0 then
        set oldDelims to AppleScript's text item delimiters
        set AppleScript's text item delimiters to {return}
        set theList to nList as text
        set AppleScript's text item delimiters to oldDelims
        set theList to "Attachments to message " & theSub & return & theList
        set the clipboard to theList
        set the content of theMsg to (the content of theMsg & return & theList)
    end if
    open theMsg
end tell

--
My web page: <http://home.earthlink.net/~allenwatson/>
My scripts page: <http:homepage.mac.com/allenwatson>
Microsoft MVP for Mac Entourage/Word--<[EMAIL PROTECTED]>

Reply via email to