The smartest, most effective solutions for Importing, Exporting and Recovering all of your Outlook mail data.

Exporting emails from Entourage to Outlook

Article by Dave Addey

I’ve recently had to export a bunch of emails from Entourage and into Outlook, in order to send them to someone in a format they can browse and read on a PC.  You’d think that exporting a selection of emails from one Microsoft email management tool to another would be easy, right?  Sadly not.  Thankfully, a bit of Applescript and a relatively cheap utility got things working for me.  This post describes how.

The main problem is the lack of a common format between Entourage (.mbox for folders, .eml for individual emails) and Outlook (.pst for everything).  There used to be a really good Applescript export tool for exporting from Entourage, but sadly it’s never been updated to work on Leopard.  You can export a whole folder as an MBOX file from Entourage, but these can’t be opened by Outlook and so aren’t much use either.

(As an aside, there are numerous ways to go the other way, to export from Outlook and import into Entourage.  It’s almost as if lots of people are switching from PC to Mac, but few need to go in the other direction…)

My eventual solution has two parts – getting mail out of Entourage, and then getting it in to Outlook.

Getting mail out of Entourage

For this part, I wrote an Applescript (based heavily on a code from macosxhints) to export all currently-selected emails in Entourage to a folder on my Mac.  Many thanks to macosxhints user golgi_body for posting the original code.

Here’s the script I’m using (copy this into Script Editor to use it):

tell application "Microsoft Entourage"
    -- get a reference to all selected messages from entourage
    set selectedMessages to the current messages
    if selectedMessages is {} then
    end if

    -- absolute reference to our export folder
    set fpath to "DiskName:Users:myusername:Documents:existingfolder:"

    repeat with i in selectedMessages

        set sentDate to time sent of i
        set fname to fpath ¬
            & my padNumber(year of sentDate as integer) ¬
            & "-" & my padNumber(month of sentDate as integer) ¬
            & "-" & my padNumber(day of sentDate as integer) ¬
            & "-" & my padNumber(hours of sentDate as integer) ¬
            & "-" & my padNumber(minutes of sentDate as integer) ¬
            & "-" & my padNumber(seconds of sentDate as integer) ¬

        tell application "Finder"
            if (exists file (fname & ".eml")) then
                set k to 1
                repeat while (exists file (fname & "-" & (k as string) & ".eml"))
                    set k to k + 1
                end repeat
                set fname to (fname & "-" & (k as string))
            end if
        end tell

        set fname to fname & ".eml"
        save i in fname
        tell application "Finder" to update file fname

    end repeat

end tell

to padNumber(theNumber)
    if theNumber is less than 10 then
        return "0" & theNumber
        return theNumber
    end if
end padNumber

You’ll need to set fpath to be the path to an existing folder on your Mac. When you run this script in Script Editor, all of the selected files in Entourage will be exported to your export folder as .eml files.

Why use Applescript at all?  Why not just drag the selected emails onto a folder?  After all, this prompts Entourage to export them itself in .eml format.  The problem is, when you do so, Entourage exports the emails using the email subject as the file name.  This can contain all sorts of weird and wonderful characters, and Windows doesn’t like that at all.  This script avoids the problem altogether by using the date and time the email was sent as the filename.  (It also makes it easier to order your .eml files by date and time in the Finder if you need to.)

Getting mail in to Outlook

For this part, I used a Windows utility called Outlook Import Wizard.  It costs $19.95, but it’s more than worth it when you consider the time it can save.  You can download it and try it out for free (max 5 emails per demo import), but be warned – in demo mode, you can’t turn on the “Enable the EML Preprocessing (Unix, MAC)” option to make the wizard recognise Mac-encoded emails, and so your imported emails will contain lots of “=” symbols when you view them in Outlook.  The good news is that the purchased app works fine with Mac-encoded emails.

The import process is pretty easy.  On your PC with Outlook installed, work through the Outlook Import Wizard, being sure to turn on the “Enable the EML Preprocessing (Unix, MAC)” option (found under the “Options” button on the “Select the source folder” screen) to make sure that your Mac-encoded emails are recognised.  The wizard is pretty self-explanatory, and there are full instructions online, so I won’t run through the rest of the settings in detail here.  It’ll take a while to do the import, but eventually you’ll end up with all of your emails in Outlook, with all attachments and the original headers.

I’ve only tried this process myself with Entourage 2008 (on Leopard) and Outlook 2002 (on XP), but I would expect it to work with earlier versions of Entourage too.  The Outlook Import Wizard claims to work on Windows 98/Me/NT 4.0/2000/XP/2003 with Outlook 98/2000/2002/2003/2007, so you should be good to go no matter what your setup.