public static void Run()
{
// ExStart:RetreiveParentFolderInformationFromMessageInfo
// Load Pst File
string dataDir = RunExamples.GetDataDir_Outlook() + "PersonalStorage.pst";
using (PersonalStorage personalStorage = PersonalStorage.FromFile(dataDir))
{
foreach (FolderInfo folder in personalStorage.RootFolder.GetSubFolders())
{
foreach (MessageInfo msg in folder.EnumerateMessages())
{
FolderInfo fi = personalStorage.GetParentFolder(msg.EntryId);
}
}
}
// ExEnd:RetreiveParentFolderInformationFromMessageInfo
}
}