How to copy a calendar folder from one .pst to another?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The idea is to have a master calendar that is updated to the .pst of all office workers. Client does not have Exchange or file server.

I am pursuing 2 ideas, but making no headway on either.

1) Is there a way to programmaticaly copy a calendar folder from one .pst to another?

2) Can I program the export of appointments from one .pst and import into another .pst. I have been unable to find any methods for dealing with import/export under outlook.
 
Have you looked at MAPIFolder.CopyTo? It can copy a folder and its
contents to another folder. Of course the folders in both PST files
must be accessible, so both PST's must have been opened in Outlook.
One can be the user's default PST file and the other can be the shared
one. The shared one can be opened if you know the path to it in the
file system using the NameSpace.AddStore method. Use the Object
Browser to see all the methods, properties and events available for
Outlook objects.

Opening a PST file in Outlook locks it. So the shared PST won't be
able to be opened by another user until the first Outlook disconnects
the PST and exits. If you don't disconnect the shared PST (using the
NameSpace.RemoveStore method) the next time that Outlook is opened it
will automatically open the shared PST file and lock it.

The import/export functions in Outlook are not accessible in code. You
have to create your own code for that.




Ken Edwards said:
The idea is to have a master calendar that is updated to the .pst of
all office workers. Client does not have Exchange or file server.
I am pursuing 2 ideas, but making no headway on either.

1) Is there a way to programmaticaly copy a calendar folder from one ..pst to another?

2) Can I program the export of appointments from one .pst and import
into another .pst. I have been unable to find any methods for dealing
with import/export under outlook.
 
Back
Top