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)
Console.WriteLine(folder);
}
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:
- GroupDocs.Viewer for .NET examples, plugins, and showcase
- GroupDocs.Viewer for Java examples, plugins, and showcase
- Document Viewer for .NET MVC UI Example
- Document Viewer for .NET App WebForms UI Modern Example
- Document Viewer for Java App Dropwizard UI Modern Example
- Document Viewer for Java Spring UI Example