Retrieve folders

GroupDocs.Viewer provides additional information for Outlook Data Files when calling GetViewInfo method. To retrieve view information for Outlook Data File call GetViewInfo method and cast output result to OutlookViewInfo type.

Following example demonstrates how to retrieve view information for Outlook Data File.

using (Viewer viewer = new Viewer("sample.ost"))
{
    ViewInfoOptions viewInfoOptions = ViewInfoOptions.ForHtmlView();
    OutlookViewInfo viewInfo = viewer.GetViewInfo(viewInfoOptions) as OutlookViewInfo;

    Console.WriteLine("File type is: " + viewInfo.FileType);
    Console.WriteLine("Pages count: " + viewInfo.Pages.Count);

    foreach (string folder in viewInfo.Folders)
        Console.WriteLine(folder);
}