
Extract Contact Information From Outlook PST File
I'm having a bit of trouble finding how to open a PST file through VB.NET.
I am attempting to access contact data in the PST. I can access the default
contact folder with the following code:
'****************** BEGIN CODE ************************
Dim objOutlook As New Outlook.Application()
Dim objNameSpace As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
objNameSpace = objOutlook.GetNamespace("MAPI")
objFolder =
objNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts)
'****************** ENDCODE ************************
My question is, how would I open a PST with a specified path (i.e. c:\My
Documents\outlook.pst) instead of using the default folder?
Thank you in advance for your help!
-Damien