public static void Run()
{
// ExStart:CreateNewPSTFileAndAddingSubfolders
// The path to the file directory.
string dataDir = RunExamples.GetDataDir_Outlook();
// Load the Outlook file
string path = dataDir + "CreateNewPSTFileAndAddingSubfolders_out.pst";
if (File.Exists(path))
{
File.Delete(path);
}
else
{
}
// Create new PST
PersonalStorage personalStorage = PersonalStorage.Create(path, FileFormatVersion.Unicode);
// Add new folder "Test"
personalStorage.RootFolder.AddSubFolder("Inbox");
// ExEnd:CreateNewPSTFileAndAddingSubfolders
}
}