Name: Outlook-Add-In-Contextual-Regex
Owner: Office Developer
Description: This sample add-in demonstrates how to create a contextual add-in that activates when a regular expression match is detected in the body of a message.
Created: 2018-01-11 21:18:43.0
Updated: 2018-05-17 21:57:44.0
Pushed: 2018-01-11 22:36:26.0
Homepage: null
Size: 61
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This sample add-in demonstrates how to create a contextual add-in that activates when a regular expression match is detected in the body of a message.
The add-in detects fictitious Contoso order numbers with a specific format. The format used is CO-
followed by 9 digits. When activated, the add-in simply displays both the selected order number and a list of all detected order numbers in the message.
Note: Getting the selected order number relies on an API currently in preview, so it may not be available in all clients. If it is not, the add-in will indicate that it is not supported.
In order to try this add-in, you'll need:
Unless you are going to run the add-in locally, copy the HTML, CSS, JavaScript, and PNG files from the project to your web server, maintaining the same directory layout.
Open the manifest (contoso-order-number-manifest.xml
) in a text editor and replace all instances of https://localhost:8080
with the URL to the directory where you copied the files in the previous step.
Verify that you can browse to the updated URLs in your manifest from your client using a browser. For example, you should be able to browse to the URL in the <bt:Url id="detectedEntityURL">
element in the manifest and see the following page:
Follow the instructions at Sideload Outlook add-ins for testing to sideload the contoso-order-number-manifest.xml
file.
Open Outlook on the web.
Send yourself a message with a Contoso order number in the body. For example:
ks for your order! Your order number is CO-123456789.
When the message arrives in your inbox, open it. The order number should be highlighted. Click on the order number to open the add-in.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Copyright (c) Microsoft. All rights reserved.