Office Add-in Development Community (PnP) -- July 2021 update
The Office Add-ins developer platform team has new updates to share this month on Office Add-ins Patterns and Practices. PnP is a community effort, so if you’re interested in contributing, see our good first issue list.
[Diagram showing new email with added external recipient. OnMessageRecipientsChange event is sent to Outlook add-in. Add-in prepends the text external to the subject line] “Diagram showing new email with added external recipient. OnMessageRecipientsChange event is sent to Outlook add-in. Add-in prepends the text external to the subject line”
This sample uses event-based activation to run an Outlook add-in when the user creates a new message or appointment. The add-in can respond to events, even when the task pane is not open. It registers for the OnMessageRecipientsChanged event. If the message has external recipients, the add-in prepends “[External]” to the message subject. When the user sends an email message that includes external recipients, the add-in appends a disclaimer to the message.
- Check out the code sample: Use Outlook event-based activation to tag external recipients (preview)
- Check out the docs: Configure your Outlook add-in for event-based activation (preview)
This sample shows how to insert an existing template from an external Excel file into the currently open Excel file. Then it retrieves data from a JSON web service and populates the template for the customer.
- Check out the code sample: Insert an external Excel file and populate it with JSON data
- Check out the docs: insertWorksheetsFromBase64 method
We moved the SSO samples to the PnP repo. We also updated them to the latest packages and libraries. You can find them here:
- Single Sign-on (SSO) sample Outlook add-in
- Office Add-in that supports Single Sign-on (SSO) using Node.js
- Office Add-in that supports Single Sign-on (SSO) using ASP.NET
PnP is a community effort by developers like you. Check out our good first issue list as a great place to help with some samples. Feel free to contribute to existing samples or create new ones.
Office Add-ins PnP is a Microsoft-led, community driven effort that helps developers extend, build, and provision customizations on the Office platform the right way by providing guidance and help through official documentation and open-source initiatives. The source is maintained in GitHub where anyone can participate and provide contributions to the samples, reusable components, and documentation. Office Add-ins PnP is owned and coordinated by Office engineering teams, but the work is done by the community for the community. Find code samples for Office Add-in development in the Office Add-ins PnP repo. Some samples are also documented in the Office Add-ins docs, such as Open in Excel.
- Get started with Office development by joining the Microsoft 365 developer program.
- Try out some samples and get coding quickly with Office add-ins by downloading Script Lab.
- Automate your solutions with Office Scripts.
Learn more by joining the monthly Office Add-ins community call.