
Creating a *.pst file via code
So AddStore creates the *.pst file as well as open it if it is not
already open? (Sorry, its 1:00Am in the morning and too tired to try it
out tonight.)
Quote:
> Using the objects below...
> myOlApp.Session.AddStore("c:\FooBar.pst")
> Jeff
>>-----Original Message-----
>>Thank that solves a part of the problem. However, what if
> the *.pst file
>>doesn't exist? Is there a way to CREATE a new *.pst file
> via code.
>>>You can use this method to access a pst folder which is
> not currently open.
>>>Regards
>>>Natarajan
>>>Dim myOlApp As New Outlook.Application
>>>Dim myNS As Outlook.NameSpace
>>>Set myNS = myOlApp.GetNamespace("MAPI")
>>>myNS.AddStore "c:\mypst.pst"
> message
>>>>Is there a way to programically open & close a *.pst
> file?
>>>>I'm developing functionality that will allow Access to
>>>>create & remove Outlook folders in various *.pst files.
> I
>>>>need the ability to open a *.pst file if the *.pst file
> is
>>>>not currently open. (I posted this in the Office
> Developer newsgroup but
>>>>didn't get any bytes - thought that yall might have
> some ideas.)
>>.