HOW TO: Open two PST files at once

J

Joel Finkel

Folks,

I have given up banging my bloodied head against the wall. Can someone please give me a code snippet that will allow me to access two PST files at once? I simply want to go through a Folder hierarchy in one and move all the MailItems into the same File hierarchy in the other. If a Folder in the destination does not exist, I will create it.

The Folder tree traversal is easy recursion. But I cannot seem to find any documentation on how to obtain handles to the two PST files.

Thanks in advance for all suggestions!

Regards,
Joel Finkel
(e-mail address removed)
 
D

Dmitry Streblechenko \(MVP\)

You can access top level root folders (be that each PST file, Exchange, etc)
using the Namespace.Folders collection.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Folks,

I have given up banging my bloodied head against the wall. Can someone
please give me a code snippet that will allow me to access two PST files at
once? I simply want to go through a Folder hierarchy in one and move all
the MailItems into the same File hierarchy in the other. If a Folder in the
destination does not exist, I will create it.

The Folder tree traversal is easy recursion. But I cannot seem to find any
documentation on how to obtain handles to the two PST files.

Thanks in advance for all suggestions!

Regards,
Joel Finkel
(e-mail address removed)
 
J

Joel Finkel

Dmitry,

Why is it that whenever I have a question, you always seem to come up with
an easy answer for me :eek:)

Thanks.

/Joel

PS. I'm going to ask you a tougher question in a little while. Just wait.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top