Click here to Skip to main content
15,885,537 members
Articles / Desktop Programming / MFC
Article

Outlook 2000 bulk exporter

Rate me:
Please Sign up or sign in to vote.
3.75/5 (5 votes)
22 Nov 20013 min read 105.7K   1.5K   26   8
Escape the confines of Outlook 2000

Warning upfront

This is the apex of spaghetti code. Its poorly designed and needs a lot of TLC. So why am I releasing this? Well, because you might find this useful to just use. Or you might even hack this a bit yourself!! :)

What it does

It opens your default Outlook2k profile and dumps the item types you select to a directory. I assume Outlook will ask you for a default profile if you don't have one, but I haven't tested this.

How to use it

  1. Check the item types you want to export
  2. Select a directory to export to.
  3. Click export button

Why I did it

I have been spending most of my time in linux, and booting into win2k just to get access to my PIM data, e.g. outlook. This sucked. Since MS insists on entrapping you by providing decent import abilities but abysmal export features, I needed to hack this thing up so I could get out.

My strategy to escape Outlook.

  1. Deal with calendar (tasks/appointments)
  2. Deal with contacts
  3. Deal with email store

Take all my appointments and dump each one to disk in iCAL format. This required me to read rfc[2445] and spend many wonderful hours figuring that out. Then I had to take all my contacts and dump in vCard, rfc[2426], which was surprisingly easy.

The biggest issue was all my email (500MB PST file). I didn't want to hack an mbox interface, and I didn't want to link with mozilla's xpcom for a simple export util. My solution?  Setup an IMAP server on my spare linux box and copy all my email folders to an account there.

I used qmail  and courrier-imap. READ:  Life with qmail or Qmail Tutorial on linux.com. This had the benefit that I didn't have to deal with attachments, a concern since that meant yet another RFC. Besides, it only took a few minutes instead of the hours an mbox interface would have taken.

The Code you should read:

1. buildercal.cpp

BuildCalendar::Build()<br>
2. buildercontact.cpp BuildContact::Build()

Everything else is typical boring MFC <-- fruit of the devil.

Limitations

  • It doesn't deal with journal items at all.
  • Todo/Task list is not handled at all
  • It dumps Note items as text
  • No profile support yet, it uses default profile.

Multiline body/comments in appointments/tasks are whacked. There is no way to take a bunch of lines and insert them into iCAL/vCard. So the solution was to replace all \r\n with \\. Now everything is on one line but it looks nasty. Better than losing data I suppose.

Binary data/attachments are not handled at all, period. If its not text native to the item, it doesn't go anywhere. When I wrote this, olexp was not doing line folding/unfolding

Plans that I have

None, absolutely none.

If you want to improve on this, possibly use the BuildCalendar/Contact::Build() as a base for a decent export COMAddin, feel free. In fact I think you really really should. :)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Questioncan you give me some tips about how to copy a .pst file in using? Pin
hu5821-Jul-05 17:01
hu5821-Jul-05 17:01 
GeneralNo Profiles Show Up Pin
Dharmesh Shah1-Mar-05 6:15
Dharmesh Shah1-Mar-05 6:15 
GeneralCreateDispatch failed Pin
Anthony_Yio10-Feb-04 20:58
Anthony_Yio10-Feb-04 20:58 
GeneralRe: CreateDispatch failed Pin
Anthony_Yio15-Apr-04 20:29
Anthony_Yio15-Apr-04 20:29 
Questiondoesn't save attachments? Pin
Michael Marks7-Nov-02 11:50
Michael Marks7-Nov-02 11:50 
AnswerRe: doesn't save attachments? Pin
Anonymous9-Nov-02 11:07
Anonymous9-Nov-02 11:07 
GeneralRe: do you have a sample with imap? Pin
gok14-Apr-03 7:25
professionalgok14-Apr-03 7:25 
QuestionCan I use your Export OutLook without having VC++ installed Pin
14-Mar-02 20:48
suss14-Mar-02 20:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.