I have written an add-in for outlook web. This addin gets activated based on the string match found in the Body of an email with PropertyName="BodyAsPlaintext", but the same regular expression is not working when I change the PropertyName="Subject".
For example: If it finds a string in Body of an email something like D3451-0032, G3645-7462/442 or 3702/3621392 its working fine. But if I try to send the same string in Subject of an email then its not working. I am attaching my manifest.xml file.
Thanks
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>336c0281-182c-4a74-bcf4-8b820ab56e5b</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>[Provider name]</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="RegEx" />
<Description DefaultValue="[Outlook Add-in description]"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/hi-res-icon.png"/>
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!--<SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]" />-->
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<!--<AppDomains>-->
<!--<AppDomain>AppDomain1</AppDomain>-->
<!--<AppDomain>AppDomain2</AppDomain>-->
<!--<AppDomain>AppDomain3</AppDomain>-->
<!--</AppDomains>-->
<!--End Basic Settings. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://localhost:3000/index.html"/>
<RequestedHeight>450</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="RuleCollection" Mode="And">
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
</Rule>
<Rule xsi:type="ItemHasRegularExpressionMatch"
PropertyName="Subject" RegExName="MatchNumber"
RegExValue="((\d{4}\/\d{7})|([A-Z]\d{4}-\d{4}(\/\d{3})?))(?=\s)" />
</Rule>
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
</OfficeApp>