Exporting outlook email as common format
December 7, 2005 9:46 AM
Subscribe
How do I export outlook email to a common format that I can read anywhere including a MAC.
I want to be able to save all my outlook emails but not as a .pst because outlook is the only one that can later read that pst. Is there any tool or export I can use to get each message as a rich text file or some other standard format? The only way I see possible right now is to use the export function to create a tab separated windows or dos file. This sort of works but its messy and all the emails show up as one file.
I also thought about maybe exporting it to an access MDB where each record is an email and then creating a report to display them nicely but i dont think the field is large enough to store entire messages in some cases.
If anyone knows of cheap software that can do this or perhaps a neat hack please let me know.
Thanks!
posted by postergeist to technology (7 comments total)
Sub ExportAll()
Dim Message As MailItem
Set myNameSpace = Application.GetNamespace("MAPI")
Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)
For Each Message In myInbox.Items
Message.SaveAs "C:\MailMessages\" & Message.Subject & ".txt", olTXT
Next Message
End Sub
You can go to Tools > Macros > Visual Basic Editor, then inside the editor, go to Insert > Module. In the new window, paste the above code.
Some potential problems: Subjects being the filename could result in identical filenames, so you'd likely overwrite some of the previously-saved messages, which is bad. I'd probably experiment with changing that line to something like:
Message.SaveAs "C:\MailMessages\" & SequenceNumber & Message.Subject & ".txt", olTXT
...where SequenceNumber is a running counter of how many messages have been exported, for example.
You should create whatever directory is specified above before running the code. In this case I made C:\MailMessages
posted by odinsdream at 10:11 AM on December 7, 2005