Re: How to delete links

From: Allen Watson (allenwatson_at_earthlink.net)
Date: 06/06/04


Date: Sat, 05 Jun 2004 19:52:13 -0700

in article daweeks-6908D7.20370804062004@corp.newsfeeds.com, David Weeks at
daweeks@earthlink.net wrote on 6/4/04 8:37 PM:

> In article <BCE62964.CB60%allenwatson@earthlink.net>,
> Allen Watson <allenwatson@earthlink.net> wrote:
>
>> in article 43d55b96.0406031035.55fccf5@posting.google.com, David Weeks at
>> david@dweeks.net wrote on 6/3/04 11:35 AM:
>>
>>> On a related note, I need to link an email that contains a reply to an
>>> earlier email. Is there are way to link the two without having to use
>>> the dialog box to pick the file to be linked. Can I use a more
>>> GUI-related method to highlight the two emails, then create the link
>>> that way?
>>
>> I'm not sure where your problem is. If you open one message, click "Link" in
>> the toolbar, and then "Link to existing Message", you can use the standard
>> GUI folder interface to locate the second message you want to link to.
>
> The issue is that for reasons too mundane to list here, I have lots of
> emails with the same subject (comes from a web-based form). I create
> replies to each email. As the subjects are all the same, threading does
> not work well.
>
> I want to have the original message open in its own window, then
> down-arrow through the list in the preview pane until I find the correct
> reply, and create the link while viewing the reply. Trying to select the
> right message from hundreds with the same title, differing only by
> modification date is well-nigh impossible.
>
>
That's a very good reason. Okay, try this little script. Copy it to Script
Editor (making sure to eliminate undesired line breaks), compile and save it
in Entourage Script Menu Items folder. Then, select a "main message", run
the script, select a second message, re-run the script, and it will link the
second message to the first. It will remember the first script and let you
link several to it, or you can change the main message at any time. (Any
line other than the first "tell" and last line of the script that touch the
left margin are unintentional line breaks imposed by transmission.)

property mainMsg : ""

tell application "Microsoft Entourage"
    set theMsg to item 1 of (get current messages)
    set frm to display name of sender of theMsg
    set sub to subject of theMsg
    if mainMsg = "" then
        display dialog "Set this as main message to link others to?" buttons
{"Cancel", "No", "Yes"} default button "Yes"
        set b to button returned of result
        if b = "No" or b = "Cancel" then
            display dialog "Exiting" giving up after 3
        else if b = "Yes" then
            set mainMsg to theMsg
            display dialog "You may now select a message to link to this
one, and re-run the script."
        end if
    else
        set mfrm to display name of sender of mainMsg
        set msub to subject of mainMsg
        display dialog "Choose option for:
" & sub & return & "From: " & frm buttons {"Set new Main Msg", "Link to Main
Msg", "Cancel"}
        set b to button returned of result
        if b = "Set new Main Msg" then
            set mainMsg to theMsg
            display dialog "You may now select a message to link to this
one, and re-run the script."
        else if b = "Link to Main Msg" then
            link theMsg to mainMsg
            display dialog "Messages linked. You may select another message
to link to the main message, or select a new main message, and re-run the
script."
            return
        else
            return
        end if
    end if
end tell

-- 
Microsoft MVP for Entourage/OE/Word (MVPs are volunteers)
Allen Watson <AllenW@mvps.org> Entourage FAQ site:
<http://www.entourage.mvps.org/>
AppleScripts for Outlook Express and Entourage:
 <http://homepage.mac.com/allen_a_watson/FileSharing3.html>
Entourage Help Pages: <http://www.entourage.mvps.org/>