VBA to Import and Export PST files 
Author Message
 VBA to Import and Export PST files

See below

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


Quote:
> - Create a PST file given the path.

Call Namespace.AddStore() passing a fully qualified path to the new PST
file.

Quote:
> - Allow the user to choose the Outlook folder from which
> to export (Personal, Public, etc), including subfolders.

Call Namespace.PickFolder to let user select a folder. Selected MAPIFolder
object will be returned.

Quote:
> - Choose not to export duplicate files.

I am not sure what you mean,

Quote:
> - Export only files Received on or after a given date.

Use MAPIFolder.Items.Restrict() passing the appropriate restriction to get
back a restricted collection of items from the particular folder.


Sun, 15 May 2005 06:36:03 GMT  
 VBA to Import and Export PST files
Thanx. Great info.

On the:

Quote:
>> - Choose not to export duplicate files.

When the user is going through the Import and Export
Wizard, they get to the screen that says, 'Save Exported
File As:' and it has three radio buttons below the text
box. One of them says, 'Do Not Export Duplicate Items'.

/~

Quote:
>-----Original Message-----
>See below

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



>> - Create a PST file given the path.

>Call Namespace.AddStore() passing a fully qualified path
to the new PST
>file.

>> - Allow the user to choose the Outlook folder from which
>> to export (Personal, Public, etc), including subfolders.

>Call Namespace.PickFolder to let user select a folder.
Selected MAPIFolder
>object will be returned.

>> - Choose not to export duplicate files.

>I am not sure what you mean,

>> - Export only files Received on or after a given date.

>Use MAPIFolder.Items.Restrict() passing the appropriate
restriction to get
>back a restricted collection of items from the particular
folder.

>.



Sun, 15 May 2005 07:00:55 GMT  
 VBA to Import and Export PST files
I don't know what kind of logic Outlook uses - duplicate subjects?
message-ids?

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


Quote:
> Thanx. Great info.

> On the:

> >> - Choose not to export duplicate files.

> When the user is going through the Import and Export
> Wizard, they get to the screen that says, 'Save Exported
> File As:' and it has three radio buttons below the text
> box. One of them says, 'Do Not Export Duplicate Items'.

> /~

> >-----Original Message-----
> >See below

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



> >> - Create a PST file given the path.

> >Call Namespace.AddStore() passing a fully qualified path
> to the new PST
> >file.

> >> - Allow the user to choose the Outlook folder from which
> >> to export (Personal, Public, etc), including subfolders.

> >Call Namespace.PickFolder to let user select a folder.
> Selected MAPIFolder
> >object will be returned.

> >> - Choose not to export duplicate files.

> >I am not sure what you mean,

> >> - Export only files Received on or after a given date.

> >Use MAPIFolder.Items.Restrict() passing the appropriate
> restriction to get
> >back a restricted collection of items from the particular
> folder.

> >.



Mon, 16 May 2005 03:12:35 GMT  
 VBA to Import and Export PST files
This turned out to be great information. Now I want to tie it all
together. I've used Restrict to make a set of messages that were
Received on or after a given date, and I used AddStore to create a new
PST file. How do I 'pass' the set of files to the new PST file?
Quote:

> See below

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



> > - Create a PST file given the path.

> Call Namespace.AddStore() passing a fully qualified path to the new PST
> file.

> > - Allow the user to choose the Outlook folder from which
> > to export (Personal, Public, etc), including subfolders.

> Call Namespace.PickFolder to let user select a folder. Selected MAPIFolder
> object will be returned.

> > - Choose not to export duplicate files.

> I am not sure what you mean,

> > - Export only files Received on or after a given date.

> Use MAPIFolder.Items.Restrict() passing the appropriate restriction to get
> back a restricted collection of items from the particular folder.



Mon, 16 May 2005 08:02:37 GMT  
 VBA to Import and Export PST files
I am not sure what you mean - do you mean pass file names to AddStore()? If
you pass the path to an existing PST file, it will be opened, if it does not
exist yet, it will be created.

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


Quote:
> This turned out to be great information. Now I want to tie it all
> together. I've used Restrict to make a set of messages that were
> Received on or after a given date, and I used AddStore to create a new
> PST file. How do I 'pass' the set of files to the new PST file?




Quote:
> > See below

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



> > > - Create a PST file given the path.

> > Call Namespace.AddStore() passing a fully qualified path to the new PST
> > file.

> > > - Allow the user to choose the Outlook folder from which
> > > to export (Personal, Public, etc), including subfolders.

> > Call Namespace.PickFolder to let user select a folder. Selected
MAPIFolder
> > object will be returned.

> > > - Choose not to export duplicate files.

> > I am not sure what you mean,

> > > - Export only files Received on or after a given date.

> > Use MAPIFolder.Items.Restrict() passing the appropriate restriction to
get
> > back a restricted collection of items from the particular folder.



Sat, 21 May 2005 05:42:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Exporting/Importing pst files via VBA

2. Programatically import/export to PST file

3. VBA macro to import pst file

4. VBA sub to import .pst file.

5. VBA code to import .pst file into Outlook

6. Export to a .pst file using VBA

7. LDIF-file-import to Excel and prepare data for VBA-ADSI-Export

8. Importing .PST files?

9. Importing pst files

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

11. Importing from PST or EDB file formats--possible?

12. Exporting into PST-File

 

 
Powered by phpBB® Forum Software