Render Outlook Data File Folder

GroupDocs.Viewer renders messages from all folders (including nested folders) by default. When you need to render items from a specific folder, set Folder property of the OutlookOptions class as shown in the example below. Please note that you should use the following convention for naming folders and subfolders to specify it in FolderName option: {Parent folder name}\\{Sub folder name}. Thus, if you need to render items from Inbox folder just specify Folder = "Inbox"; when you need to render subfolder named “Orion” that resides in a folder named “Urgent” that in turn resides in Inbox, set: Folder = "Inbox\\Urgent\\Orion". 

The following code samples show how to use this option for rendering:

			using (Viewer viewer = new Viewer("sample.ost"))
            {
                HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
                viewOptions.OutlookOptions.Folder = "Inbox\\SubFolder\\SubFolder2";
                viewer.View(viewOptions);
            }

More resources

GitHub Examples

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

Free Online App

Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.