Entourage import, date issue

M

mkc27

Hello!

I just imported some .mbox files into Entourage 2004, and the "date
recieved" is showing the date imported. Any way I can correct that?
Thanks!
 
B

Barry Wainwright

Hello!

I just imported some .mbox files into Entourage 2004, and the "date
recieved" is showing the date imported. Any way I can correct that?
Thanks!

Yes, with this script:
http://tinyurl.com/6mg9p

If that URL Doesn't work, here is the script in full:

-- Correct the date v1.0 25th June 2002
-- a script for Microsoft Entourage by Barry Wainwright
-- Resets the date of messages to the date of the first received header
-- useful for messages with badly formatted (or just plain wrong) dates

tell application "Microsoft Entourage"
set theMessages to current messages
if theMessages is {} then
display dialog "No messages selected!" buttons {"Stop"} default
button 1 with icon stop
return -99
end if

repeat with theMess in theMessages
set theHeaders to the headers of theMess
set AppleScript's text item delimiters to {return & space}
set theHeaders to text items of theHeaders
set AppleScript's text item delimiters to {space}
set theHeaders to theHeaders as string
set AppleScript's text item delimiters to {return & tab}
set theHeaders to text items of theHeaders
set AppleScript's text item delimiters to {space}
set theHeaders to theHeaders as string
set theHeaders to the paragraphs of theHeaders
set receivedHeader to ""
repeat with aHeader in theHeaders
if aHeader starts with "Received:" then copy contents of aHeader
to receivedHeader
end repeat
set AppleScript's text item delimiters to {";"}
set theDate to (last text item of receivedHeader)
set time received of theMess to date theDate
end repeat
end tell
 
Top