
Programatically import/export to PST file
Not the mailboxes directly. You can open a shared folder usign
Namespace.GetSharedDefaultFolder.
If you want to add another user's mail box to a profile, you might want to
use ProfMan (comes with a distributable version of Redemption, url in my
sig.) - click Redemption, then Profiles - there is an example that adds an
Exchange mailbox to a profile.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
Quote:
> Thanks - that's exactly what I needed. Is there a way to open and close
> exchange mailboxes equivalent to addstore and removestore?
> > 1. Use MAPIFolder.CopyTo()
> > 2. Use Namespace.RemoveStore()
> > Dmitry Streblechenko (MVP)
> > http://www.dimastr.com/
> > OutlookSpy - Outlook, CDO
> > and MAPI Developer Tool
> > > Thanks Dmitry, that helps a lot. I'm pretty new to Outlook VBA - are
> > there
> > > any routines to copy folders or will I need to copy each message?
Also
> is
> > > there a way to close the PST file when I'm done copying?
> > > > Create a new PST file using Namespace.AddStore, then copy the target
> > > folders
> > > > to the PST folders.
> > > > Dmitry Streblechenko (MVP)
> > > > http://www.dimastr.com/
> > > > OutlookSpy - Outlook, CDO
> > > > and MAPI Developer Tool
> > > > > Are there any simple methods of importing or exporting an entire
> > mailbox
> > > > to
> > > > > a pst file through vba? I'm looking for something like exmerge
but
> > that
> > > I
> > > > > can control through Outlook.