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.
-
Reading for fun This is a nice article from Isaac Marion. Isaac has been running the online textual variety show, BurningBuilding.com, since 2003. He lives in Seattle, Washington, where he works various mundane jobs while trying to make his writing/music/art career take off. Reading for fun Recent studies have shown that across the...... -
Art, Communication, Connectivity Michael Marcus (also known as "Jacques Treatment") is a published author, poet, artist, and game designer; with George McVey, he has been publishing comics as "The Hamtramck Idea Men" on the very sensible grounds that they live in Hamtramck, have many ideas, and they are men. Joint work can be...... -
How Has the Internet Affected the Music Industry? This article is written by web designer Josh Gutteridge who runs Skyte Media. Skyte Media is based in the Midlands (England) and is a professional web design company that specialises in web design and development. Josh would like to receive comments about this article on his blog. But of course...... -
Music Biz Marcos Marado wrote this exclusive article about Music Biz. Is the situation really so dramatic as he explains? Leave your comments, this could be our first really important debate on ManuelMarino.com. Music Biz I'm, first of all, a passionate for music. My passion for music before I can recall it,...... -
Surveying the Land of Scape Taegen Carter is a movie director. He is also the owner of Mythmaker Entertainment, a company that produces shorts and features in the genres of adventure, sci-fi, thriller and drama. Taegen tells us about the production of Scape, that should be completed around June of ’09. Let's read his words,......
-
Musician Profile For Mark O'Connor Mark O' Connor was born and brought up in Seattle, Washington. There, while he was growing up and progressing through his teenage years, he entered into and won several national championships on a number of instruments, including but not limited to the fiddle. From 1983, O'Connor moved to Nashville, having...... -
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...... -
Advanced e-mail options When you click the Advanced E-Mail Options button in the E-Mail options dialog box, Outlook displays the dialog box shown in Figure 27-50. FIGURE 27-50 Setting advanced e-mail options. Most of these options are self-explanatory, so I do not go into details with those. The few that may require explanation...... -
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,...... -
Smartphones and Netbooks will save us Seems that Technology industry will have enough difficulties in 2009, considering the global nature of the recession, but smartphones and netbooks will sell well. Smartphones are mobile phones with Personal Digital Assistants hearts. They offer features that can not be found in standard phones, like MP3 players, Web browsers, Bluetooth,......
Comments
Got something to say?





