How to get Outlook Data file 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)

More resources

View OST/PST Files Online

Along with full-featured .NET library we provide simple but powerful free online Apps. View OST and PST files online with GroupDocs Viewer App.

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples: