Re: creating folder in pst

Hi


I am able to create folder in pst but the code as follows

FolderInfoObject = ParentFolderObject.AddSubFolder
(“Inbox”, “IPF.Mail”);

The issue is that the folder is created but the icons is of draft folder.
Not that of the satndard inbox folder icon that is seen in outlook.
Please see the attcahment which show the screenshot of the issue.


Default folder icon should be retain.

Please give any solution on this.

Thanks
Amol Sonawane

Hi Amol,


Thank you for writing to us.

This is not an issue associated with Aspose.Email. I would like to share that the standard icons are reserved for the predefined folders only. If you will create your folder as a predefined one, the icons will be the same as that of the standard folder icons as you can try with the following sample code. Please let us know if we can be of any additional help to you in this regard.

Sample Code:


PersonalStorage pst = PersonalStorage.Create(“Temp.pst”, FileFormatVersion.Unicode);

pst.CreatePredefinedFolder(“Inbox”, StandardIpmFolder.Inbox);

FolderInfo fi = pst.CreatePredefinedFolder(“Contacts”, StandardIpmFolder.Contacts);

pst.Dispose();