Collapse the table of content
Expand the table of content
Expand Minimize

Rule element (MailApp complexType) (app manifest schema v1.1)

Office Add-ins

Specifies the activation rule that should be evaluated for this mail app.

Last modified: March 09, 2015

Note Note

The name "apps for Office" is changing to "Office Add-ins". During the transition, the documentation and the UI of some Office host applications and Visual Studio tools might still use the term "apps for Office".

Mail app

Element type

Rule

Namespace

http://schemas.microsoft.com/office/appforoffice/1.0

Schema file

offappmanifest.xsd

<xs:element name="Rule" type="Rule" minOccurs="1" maxOccurs="1"></xs:element>

If the schema defines specific requirements, such as sequence, minOccurs, maxOccurs, and choice, see the definition section.

Parent elements

None.

Child elements

None.

Attributes

None.

Because this Rule element is of the Rule abstract type, and there are rule complex types that extend this abstract type, when specifying an individual rule in a manifest, use the xsi:type attribute to specify one of these rule complex types. These types include the ItemIs, ItemHasAttachment, ItemHasKnownEntity, ItemHasRegularExpressionMatch complex types.

The second and third Rule elements in the following rule collection are examples:

<Rule xsi:type="RuleCollection" Mode="And">
    <Rule xsi:type="ItemIs" ItemType="Message"/>
    <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="VideoURL" 
      RegExValue="http://www\.youtube\.com/watch\?v=[a-zA-Z0-9_-]{11}" 
      PropertyName="BodyAsPlaintext"/>
</Rule>

Show:
© 2015 Microsoft