Hello @pavel.zaitsau,
Those sample code is a rough oversight. I guess you need to extract messages from a PST and save them in HTML format? Please try the following code example:
// load the PST file
using (PersonalStorage personalStorage = PersonalStorage.FromFile("sourceFile.pst"))
{
// Get a folder, Inbox for example
var inboxFolder = pst.RootFolder.GetSubFolder("Inbox");
// Extract messages from folder
foreach (var mapiMessage in inboxFolder.EnumerateMapiMessages())
{
// Save msg to HTML file
mapiMessage.Save($"{fileName}.html", SaveOptions.DefaultHtml);
}
}
Sorry for the inconvenience and thank you.