message: [All hosts] (manifest) Clarify use of Highlight attribute
diff: ---
  title: Rule element in the manifest file
  description: The Rule element specifies the activation rules that should be evaluated for this contextual mail add-in.
  -ms.date: 05/14/2020
  +ms.date: 08/19/2022
  ms.localizationpriority: medium
  ---
  @@ -89,15 +89,14 @@ Defines a rule that evaluates to true if a match for the specified regular expre
  |:-----|:-----:|:-----|
  | **RegExName** | Yes | Specifies the name of the regular expression, so that you can refer to the expression in the code for your add-in. |
  | **RegExValue** | Yes | Specifies the regular expression that will be evaluated to determine whether the mail add-in should be shown. |
  -| **PropertyName** | Yes | Specifies the name of the property that the regular expression will be evaluated against. Can be one of the following: `Subject`, `BodyAsPlaintext`, `BodyAsHTML`, or `SenderSMTPAddress`.<br/><br/>If you specify `BodyAsHTML`, Outlook only applies the regular expression if the item body is HTML. Otherwise, Outlook returns no matches for that regular expression.<br/><br/>If you specify `BodyAsPlaintext`, Outlook always applies the regular expression on the item body.<br/><br/>**Note:** You must set the **PropertyName** attribute to `BodyAsPlaintext` if you specify the **Highlight** attribute for the **\<Rule\>** element.|
  +| **PropertyName** | Yes | Specifies the name of the property that the regular expression will be evaluated against. Can be one of the following: `Subject`, `BodyAsPlaintext`, `BodyAsHTML`, or `SenderSMTPAddress`.<br/><br/>If you specify `BodyAsHTML`, Outlook only applies the regular expression if the item body is HTML. Otherwise, Outlook returns no matches for that regular expression.<br/><br/>If you specify `BodyAsPlaintext`, Outlook always applies the regular expression on the item body.<br/><br/>**Important:** If you need to specify the **Highlight** attribute for the **\<Rule\>** element, you must set the **PropertyName** attribute to `BodyAsPlaintext`. |
  | **IgnoreCase** | No | Specifies whether to ignore case when matching the regular expression specified by the **RegExName** attribute. |
  -| **Highlight** | No | Specifies how the client should highlight matching text. This attribute can only be applied to **\<Rule\>** elements within **\<ExtensionPoint\>** elements. Can be one of the following: `all` or `none`. If not specified, the default value is `all`.<br/><br/>**Note:** You must set the **PropertyName** attribute to `BodyAsPlaintext` if you specify the **Highlight** attribute for the **\<Rule\>** element.
  -|
  +| **Highlight** | No | Specifies how the client should highlight matching text. This attribute can only be applied to **\<Rule\>** elements within **\<ExtensionPoint\>** elements. Can be one of the following: `all` or `none`. If not specified, the default value is `all`.<br/><br/>**Important:** To specify the **Highlight** attribute in the **\<Rule\>** element, you must set the **PropertyName** attribute to `BodyAsPlaintext`. |
  ### Example
  ```XML
  -<Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="SupportArticleNumber" RegExValue="(\W|^)kb\d{6}(\W|$)" PropertyName="BodyAsHTML" IgnoreCase="true" />
  +<Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="SupportArticleNumber" RegExValue="(\W|^)kb\d{6}(\W|$)" PropertyName="BodyAsPlaintext" IgnoreCase="true" Highlight="all" />
  ```
  ## RuleCollection
  