Programatically import/export to PST file 
Author Message
 Programatically import/export to PST file

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.



Fri, 22 Jul 2005 05:46:18 GMT  
 Programatically import/export to PST file
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


Quote:
> 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.



Sat, 23 Jul 2005 02:24:57 GMT  
 Programatically import/export to PST file
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?


Quote:
> 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.



Sat, 23 Jul 2005 07:46:24 GMT  
 Programatically import/export to PST file
1. Use MAPIFolder.CopyTo()
2. Use Namespace.RemoveStore()

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


Quote:
> 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.



Sun, 24 Jul 2005 01:26:56 GMT  
 Programatically import/export to PST file
Thanks - that's exactly what I needed.  Is there a way to open and close
exchange mailboxes equivalent to addstore and removestore?


Quote:
> 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.



Mon, 25 Jul 2005 05:09:30 GMT  
 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.



Tue, 26 Jul 2005 04:03:17 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Programatically export contacts folder to pst file

2. VBA to Import and Export PST files

3. Exporting/Importing pst files via VBA

4. Programatically exporting to a pst

5. Removing a PST file from Outlook Programatically

6. Programatically gettin PST file location.

7. VBA macro to import pst file

8. VBA sub to import .pst file.

9. Importing .PST files?

10. Importing pst files

11. VBA code to import .pst file into Outlook

12. Updating a PST file via network login and auto-importing into Outlook 2000

 

 
Powered by phpBB® Forum Software