Pst mail folders / mail items in alphabetical sort order?

with your example on page: Read Outlook PST File and Get Folders and SubFolders Information|Documentation


is it possible to sort the folder and mail items in same as outlook sorted order?

thanks.


C#
<pre class=“code-java” style=“padding: 0px; margin-top: 0px; margin-bottom: 0px; overflow: auto; font-family: “Courier New”, Courier, monospace; line-height: 1.3;”>// Get the PST file’s display name
Console.WriteLine("Display Name: " + pst.DisplayName);

// Get the folders information
FolderInfoCollection folderInfoCollection = pst.RootFolder.GetSubFolders();

// Browse through each folder to display folder name and number of messages
foreach (FolderInfo folderInfo in folderInfoCollection)
{
Console.WriteLine("Folder: " + folderInfo.DisplayName);
Console.WriteLine("Total items: " + folderInfo.ContentCount);
Console.WriteLine(“Total unread items: “ + folderInfo.ContentUnreadCount);
Console.WriteLine(”-----------------------------------”);
}

Hi Lee,


Thank you for writing to Aspose Support.

It is not possible to sort the items as in Outlook because the display scheme/format and sort is not present in the PST file itself. The sample code is just for parsing and displaying the contents of the PST file. Please feel free to write to us if you have any additional query in this regard.