Exporting Outlook mail messages
June 25, 2008
Matti Mattila wrote for us A musician story. He is back with a new article, this time a technology topic that I’m sure will interest many of you.
Exporting Outlook mail messages
I ran into a whole new problem a week ago when my six years old computer stopped working. The “Old Faithful” had served me for years, but now she finally wanted to get retired. Well, that was something she certainly had deserved after all these precious moments. I now look her sadly kicking her heels on the floor and waiting for a new life as spare parts somewhere else. The new and energetic beauty hums silently and dignified on my desk at the very same place the Old Lady was sitting before only a few days ago.
She runs on Windows Vista, which is quite a beauty but not a beast. The old wrinkly ran Windows XP, but already showed exhaustion under the too heavy workload. Now everything is changed, even my mail application turned from Outlook 2000 into a brand new Windows Mail.
Shifting from XP to Vista raised a bunch of new and unpredictable problems to solve. First of all was my new mail client. It works like a charm and that’s why I wanted to move my six-years-old email message archive from Outlook to this new client, but everything didn’t go as planned. Windows Mail could not interact with Outlook 2000 despite I set Outlook as my default mail client. This path came to its dead-end and I needed completely new approach.
My programming background was a relief as I understood that I can write a small VBA script to rescue my old messages. After thorough investigation I decided to individually save each mail message as an eml file. This format is widely understood by many different mail clients, so it was an excellent choice.
Unfortunately native Outlook 2000 lacks ability to export in eml format. Actually the format follows strictly RFC 822 specification, so writing such a script wouldn’t be too complicated. But I waited a second before rushing to code.
A quick search with my favorite search engine gave me pain relief. I found an Outlook Redemption library on the net, which would answer all my questions exporting messages from Outlook PST storage as single files. Redemption object library gives new functions thus expanding the basic Outlook object model. One of these important functions is saving a message as RFC 822 format. This is exactly what I was looking for, so writing a short script was merely whistling and wheeling.
First we need to download the Redemption object library. It’s free for development purposes and this would be enough for our sample. The second stage is unpacking the zipped file. After that the installation is just registering the library in the command prompt as follows:
regsvr32.exe C:[full path]redemption.dll
The example above assumes that you unzip the package on your hard disk in a folder you specify replacing [full path] placeholder. Finally, we need to make a reference to this library in Outlook Visual Basic editor. To do so, select Tools / References and tick the checkbox next to Redemption Outlook Library. All the objects will be exposed to the project as soon as you click OK. The following code snippet shows the basic idea on how to save the first message in Inbox as test.eml file.
Dim o As Redemption.SafeMailItem
dim i As Outlook.Explorer
Set i = ThisOutlookSession.Explorers.Item(1).Explorer
Set o = CreateObject(“Redemption.SafeMailItem”)
o.Item = i.CurrentFolder.Items.Item(1)
o.SaveAs “test.eml”, Redemption.rdoSaveAsType.olRFC822
Set o = Nothing
Set i = Nothing
Knitting the rest of the code should be relatively easy. A loop would do the most of the task while it recursively loops through the messages in Outlook folders. Each mail item is saved with unique name on the disk. Restoring these messages to Windows Mail is just dragging and dropping the files into the appropriate folders. So, thanks to Redemption for giving me these great tools to export my Outlook mail message into Windows Mail.
-
An Artist Portrait (Part Two) This is the Part Two (and final part) of the true life story as artist written by Frank V. Cahoj for our Weblog. (Part One) An Artist Portrait (Part Two) I give an unbelievable amount of credence to these two early periods in my life: one of everlasting creation, one...... -
Living as Independent Developer Today we interview Andres Martinez, owner of baKno, a game development studio located in Key Biscayne, Florida. They are a group of video game enthusiasts committed to developing new ways to deliver fun, interactive and challenging software. Living as Independent Developer Manuel Marino: You declare yourself and your team as...... -
A Preface To VoIP Service Science has made a lot of astonishing inventions and discoveries, which were always thought to be impracticable from the Stone Age to this contemporary world of expertise. Particularly in the division of communications, technology has rehabilitated the entire globe into a global village. It is now achievable to communicate with...... -
Creating Clouds Frank Kane job is very particular... he creates clouds! He can do it through his C++ library for real-time sky and 3D cloud rendering, used worldwide by scores of games and visual simulation applications on the Windows platform. Its name is SilverLining. Creating Clouds Manuel Marino: Your sky and clouds...... -
Bose Cube Speakers - An Unbiased Review If you enjoy playing music that sounds great, do yourself a favor and look into purchasing a set of Bose cube speakers. It is better not to put speakers near an open window if you can avoid it, as that will affect the sound quality. Dr Amar G Bose founded......
-
Hands-on with iOS 4 update for iPhone, iPod Touch [/caption] by Ben Patterson At last, the latest major update for the iPhone and iPod Touch is available for download via iTunes, bringing with it such long-awaited features as multitasking, a unified e-mail inbox and home-screen app folders. Should you upgrade? Well, yeah, but don't expect all your apps to...... -
Microsoft announces partners for app store Microsoft Corp has signed up multiple software partners for its upcoming cellphone software marketplace, including Web music service Pandora, game publisher Electronic Arts Inc and social site Facebook. The software company said on Tuesday it plans to discuss those partnerships and conduct demonstrations of the software store -- set to...... -
Windows Phone 7: An In-depth Look at the Features and Interface [/caption] Windows Phone 7 adds new social networking and productivity features all within a clean and touch-friendly interface. Microsoft took the wraps off of Windows Phone 7 Series (the official name for Windows Mobile 7) here Monday at Mobile World Congress. Slated to launch on handsets by holiday season 2010,...... -
REG file parser using the Boost Spirit Parser Framework I would like to thank the people who developed the following projects - they made the implementation of this project easier: I want to say a personal thank you to Silviu Simen for his article "INI file reader using the Spirit library". There was a project in which I took...... -
U.S. Air Mail Stamps Stamps -> United-States -> Postage Collecting US Airmail stamps has become such a popular hobby, by both those who collect all sorts of stamps and those who are just interesting in United States airmail stamps, that there are clubs and associations based on just that hobby. The American Air......
Related Posts
- Living as Independent Developer
- Independent Games
- Creating Clouds
- Some Tips To Help You Use The Best Trade Show Rental Displays
- Very Simple Audio Mastering Guide
Related Profiles
- Dress To Impress And Clinch That Job
- Twitter Marketing Can Be An Affordable Means To Get More Traffic
- Effective Marketing Through Flyers
- Work From Home, Home Business Ideas
- Know The Reasons To Buy A Kindle
Related Webpages
Comments
Got something to say?



