The template for a search that finds categorized messages has the following characteristics and settings:

  • Template ID: 15

  • Folders excluded: Sync Issues folder ([MS-OXOSFLD] section 2.2.1), Deleted Items folder, Junk E-mail folder

  • Items excluded: Appointments, contacts, distribution lists, journal items, sticky notes, tasks

  • Value of the PidTagSearchFolderStorageType property (section 0x00000048 (flags B and E) to indicate any category or 0x0000004A (flags B, E, and G) to indicate specific categories.

  • The affected fields of the PidTagSearchFolderDefinition property (section are as follows:

    • FolderList2: An EntryList structure ([MS-OXCDATA] section 2.3.1) that contains the folders to be searched. This will include all mailbox folders, except the ones specifically excluded by this template.

    • SearchRestriction: A Restriction structure (section that describes messages having a category. If the G flag is set in the PidTagSearchFolderStorageType property, the Restriction structure describes messages that have a category matching the string contained in the TextSearch field.

    • TextSearch: A string that specifies the categories for which to search. This field is present only if the G flag is set.