It can be done, but it would be very slow!
Look at each message, find (if possible) the sender in the address book, then
link the two.
Do this for every folder.
An untested script:
tell application "Microsoft Entourage"
set theFolders to every folder -- the root level folders
repeat with aFolder in theFolders
my recurseFolders(aFolder)
end repeat
end tell
on recurseFolders(thisFolder)
tell application "Microsoft Entourage"
repeat with aMessage in (get every message of thisFolder)
set theContacts to find (get address of sender of aMessage)
if theContacts ‚ {} then
repeat with aContact in theContacts
link aContact to aMessage
end repeat
end if
end repeat
set newFolders to every folder of thisFolder -- any subfolders?
repeat with aFolder in newFolders
my recurseFolders(aFolder) -- recursive call to process all lower
levels
end repeat
end tell
end recurseFolders
Note: there is no error checking in this script, and it will only work on POP
accounts as it stands is it enough?
Another way to do it, quicker and easier, but which would lose the
"Received" time ("Sent" will still be OK) and the "Reply" links ("You
replied to this message on...") which maybe are already lost anyway(?) would
be to confirm that you have the "Link messages to senders" in Address Book
preferences, then drag out your mail folders to become .mbox files, delete
the original mail folders or - in the case of "special" folders like Inbox,
Sent Items, etc. delete the messages within. Then drag back or double-click
the MBOX files to re-import the messages. They'll all be linked to their
contacts. You'll then have to move messages from imported "inbox 1" folders
back into the real Inbox, etc. (Select all and use the Move button: it's
much better than dragging, for large numbers of messages). I think this will
work for IMAP messages too (maintaining links): you'll have to move messages
for all IMAP folders since the dragged-in MBOXes will have created local
folders. Then you can clean up by deleting empty local folders.
This will still be about 100 times quicker than waiting for the script to
finish. But that of course will work too.
--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: <
http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <
http://macscripter.net/scriptbuilders/>
Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.
PLEASE always state which version of Entourage you are using - **2004**, X
or 2001. It's often impossible to answer your questions otherwise.