Filter messages

MS Outlook allows to filter messages inside folders by some text value from message content and by part of the sender’s or recipient’s address.

GroupDocs.Viewer also allows filtering the rendered messages using the following filters:

As an example, when setting OutlookOptions.TextFilteras ‘Microsoft’  the API will render all messages that contain the text ‘Microsoft’ in the message’s subject or body. Whereas, setting OutlookOptions.AddressFilteras ‘susan’ will filter messages that contain ‘susan’ as a part of the sender’s or recipient’s address. The following code samples show how to filter the messages.

using (Viewer viewer = new Viewer("sample.ost"))
    HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
    viewOptions.OutlookOptions.TextFilter = "Microsoft";
    viewOptions.OutlookOptions.AddressFilter = "susan";

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: