Search and filter
This section provides sample tasks that involve searching and filtering through items in a folder.
In this section
Topic | Description |
---|---|
Filter and efficiently enumerate items in a folder | Uses the Table object to filter for items in the Inbox that have attachments, and efficiently enumerate such items, displaying selected properties for each item. |
Use SetColumns to efficiently enumerate items in a folder | Improves the performance of enumerating the Items collection by using SetColumns(String) to cache certain properties of each item in the collection. |
Use arrays to efficiently enumerate items in a folder | Efficiently enumerates items in a Folder object by using the GetArray(Int32) method. |
Enumerate items in the Inbox based on the last modification time | Enumerates items in the Inbox folder based on the last modification time. |
Filter and display Inbox items modified in the last month | Filters and displays Inbox items that were modified in the last month. |
Filter and display multivalued properties when enumerating items in a folder | Filters and displays multivalued properties while enumerating items in a folder. |
Filter and display computed properties when enumerating items in a folder | Filters and displays computed properties when enumerating items in a folder. |
Enumerate hidden items in a folder | Finds and enumerates hidden items in a folder. |
Use instant search to search all folders and all stores for a phrase in the subject | Uses Instant Search to search all folders and all stores for a phrase in the subject, and then displays the items in an explorer window. |
Search for a phrase in the body of items in a folder | Searches for the string "office" in the Body of items in the Inbox. |
Search attachments of items in a folder for an exact phrase | Searches for the exact search string "office" in attachments to items in the Inbox. |
Search and obtain appointments in a time range | Returns appointments in a specific time range in the default Microsoft Outlook calendar. |
Filter recurring appointments and search for a string in the subject | Filters recurring appointments that fall within a date range in a Calendar folder, and then searches in two ways for the string "office" in the subject. |
Search and obtain items in an aggregated view | Searches for items in multiple folders and stores and returns those items in an aggregated table view. |