The Outlook add-in API subset of the Office JavaScript API includes objects, methods, properties, and events that you can use in an Outlook add-in.
Preview APIs are subject to change and aren't intended for use in a production environment. We recommend that you try them out in test and development environments only. Don't use preview APIs in a production environment or within business-critical documents.
To use preview APIs:
You must use the preview version of the Office JavaScript API library from the Office.js content delivery network (CDN). The type definition file for TypeScript compilation and IntelliSense is found at the CDN and DefinitelyTyped. You can install these types with npm install --save-dev @types/office-js-preview (be sure to remove the types for @types/office-js if you've previously installed them).
You may need to join the Microsoft 365 Insider program for access to more recent Office builds in Outlook on Windows and on Mac.
You may need to configure the Targeted release option on your Microsoft 365 tenant to preview features in Outlook on the web. For more information, see the "Targeted release" section of Set up the Standard or Targeted release options.
The preview requirement set includes all of the features of requirement set 1.14.
Important
This documentation is for a previewrequirement set. This requirement set isn't fully implemented yet, and clients won't accurately report support for it. You shouldn't specify this requirement set in your add-in manifest.
Features in preview
The following features are in preview.
Activate an event-based add-in on a message in read mode
Added an XML element to specify the file extension of the attachment included in a message on which the OnMessageReadWithCustomAttachment event occurs.
Available in: Classic Outlook on Windows (Microsoft 365 subscription)
Available in: Classic Outlook on Windows (Microsoft 365 subscription)
Spam reporting improvements
Suppress the preprocessing dialog
Added the NeverShowAgainOption element as a child of the <PreProcessingDialog> element. This element adds a "Don't show me this message again" checkbox to the preprocessing dialog to prevent it from appearing again.
Available in: Outlook on the web and on Windows (new and classic) (Microsoft 365 subscription)
Use radio buttons for reporting options
Added the inputType attribute to the ReportingOptions element. This attribute uses radio buttons for the reporting options of a preprocessing dialog.
Available in: Outlook on the web and on Windows (new and classic) (Microsoft 365 subscription)
Open a task pane from the preprocessing dialog
Added the commandId and contextData options to the event.completed call. These options configure a task pane to open after a user selects Report from the preprocessing dialog.
Available in: Outlook on the web and on Windows (new and classic) (Microsoft 365 subscription)
Temporarily set the body or subject displayed in read mode
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins feedback
Office Add-ins is an open source project. Select a link to provide feedback:
The task pane UX shape for add-in commands opens a vertical task pane to the right of an open message or meeting request, allowing the add-in to provide UI for more detailed interactions.