Personal Message Store (PST) Export Utility 1.0

Stephen Genusa (steve at genusa.com)

What PMSEU Does

PMSEU was designed to export Internet messages out of Outlook while preserving the Internet headers during export. Why not use Outlook's Export feature? Outlook's "export" function strips all the useful Internet message header information as well, making their export worthless for our needs. Using PMSEU, what we've done is to export all our message data into another software package that indexes the text providing "instant" search features.

At startup PMSEU attempts to locate all message stores. These are displayed in the first list box. Selecting one of the message stores listed in the 1st list box will fill the 2nd list box with all the root level folders in the message store. Selecting a folder in the 2nd list box fills the 3rd list box with any subfolders found in the folder you selected. The utility does not support folders beyond that level but the source code is included if you need to drill farther down. You can export messages out of items listed in either list box #2 or list box #3. Just select a folder to export from, type a filename to export to into the edit box and press the Export button.

If no Internet Transport Headers are found, the utility attempts to reconstruct a header with the basic Internet info. In cases such as this, the main thing missing will be the message path. Other items are restored if they are available in the message store.

Notes: 

Downloading PMSEU

You can download PMSEU from http://www.genusa.com/utils/pmseu.zip

Download an UPDATED version from Bruno Amphoux http://www.genusa.com/utils/pmseu2.zip

improvements :
1. The export directory can be modified
2. two export modes :
* Either export all messages to a single file (its name can be modified)
* Either export each message to its own file which :
    2.a extension can be modified
    2.b last modified date attribute can be set to the sent date of the message
3. Attachements can be exported or not
4. A prefix <nnn>_ (which is the number of the message in the folder) can be added at the beginning of the attachement file names and of the message file name. This allows to determine the attached files of a message (they have the same numbering)
5. All the subfolders can be reccursively exported (a corresponding folder in the file system is then created)

Notes :
* all forbidden characters (/\:?"*<>|) are deleted from folder and message file names
* existing folders or files are overwritten
* exported attributes are :
* From
* To
* Subject
* DateSent
* DateReceived
* Text
* Attachments (if checkbox is cheched)

 

Installation and Usage

Copy the files to a directory of your choice. Read this document completely. Read the disclaimer. If you agree with the disclaimer below, run the utility (pmseu.exe) or modify the source for your needs.

Dependencies

VB 6 runtime (probably available from Microsoft or elsewhere on the Net if you don't already have it loaded). Microsoft Common Controls (for the progress bar). CDO (the messaging API). These dependencies are probably preloaded on most systems.

Support

I cannot provide support of any kind, for any reason, at any price. I've included the source code (VB 6) so you can deal with any issues that may arise or tweaking you might want to do. It took a full day of "hacking" to figure out the best approach to get at the message store to get the information we needed. This should get you started if you need to customize the way it works. PLEASE DO NOT write asking for help. I run a very busy company developing and supporting Active Server Pages components. I don't have time to support the utility. That's why I'm releasing the source. If you need help I suggest you consult a Usenet group or Google Groups. If you aren't a programmer, you can probably find one who can help you get it modified and compiled to handle your needs although they may charge you a fee.

The Microsoft Outlook documentation for scripting was difficult to find and out of date. Outlook '97 is two versions behind what I'm using. At least Microsoft could change the date/time/version information of the documentation if the scripting and object model has not changed. The CDO documentation provides descriptions of properties and methods that in some cases are almost useful. The Microsoft MSDN documentation (all 1.3 gigs) takes plenty of  patience, luck, time and luck to use. Having said all that, if you understand a little about VB and objects/collections the source will be easy to understand and you'll be able to modify it to suit your needs.

Warranty

There is no warranty express or implied. By use of this utility, or the source code, you agree to be fully liable for any damages, real or imagined (and some people can be lucid in their imagination and/or ignorance!), incurred by use or misuse, real or imagined. Use the binary and/or source at your own risk. 

Because CDO is such a "work", I suggest you backup your message stores before using this utility.

Source Code

The complete source code is included in the zip file. In researching how to do the export I found a lot of questions posted on UseNet groups about how to do something like this. The responses boiled down to general pointers that indicated the respondent had never actually coded a CDO export.

If you make some substantial changes to increase the utility of this utility I'd appreciate it if you would email me an updated copy of the source project.

Commercial/Non-Commercial Use

You can use the source for any purpose. There's no need to contact me. But you, or your company, are responsible for any liability issues that may arise from use or misuse of the source or binary. We are not liable for damages, real or supposed, incurred by a 3rd party for your use of the source or binary in any products you distribute, free or for fee. If you don't agree with the previous statement don't use the source or binary.