Hello,
I have a PST with many folders and items that I am looking at with Aspose. I would like to cast each item to the appropriate Mapi type in Aspose such as MapiMessage, MapiJournal, MapiCalendar, MapiContact and so on. What is the recommended way to do this?
For example I found this snippet of code in the documentation relating to Calendar items, but what if I did not know that the current item was going to be a Calendar item or any other type in particular?
From Working with Calendar Items in PST File|Documentation
FolderInfo folderInfo = pst.RootFolder.GetSubFolder(“Calendar”);
MessageInfoCollection messageInfoCollection = folderInfo.GetContents();
foreach (MessageInfo messageInfo in messageInfoCollection)
{
MapiCalendar calendar = (MapiCalendar)pst.ExtractMessage(messageInfo).ToMapiMessageItem();
}
Thank you for any help