HOW TO: Open two PST files at once

  • Thread starter Thread starter Joel Finkel
  • Start date Start date
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)
 
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)
 
Dmitry,

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

Thanks.

/Joel

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