Determining Default Information Store (*.pst):
Return to List
To learn which store is the Default store, you can use the DefaultStoreRoot() function (below) to get the root folder for the default store from the Parent property of the Inbox:
Public Function DefaultStoreRoot() as MAPIFolder
Dim objApp as Application
Dim objNS as Namespace
Dim objInbox as MAPIFolder
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Set DefaultStoreRoot = objInbox.Parent
End Function