Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Note
This documentation is for a requirement set other than the latest requirement set.
What's new in 1.6
Mailbox requirement set 1.6 includes all of the features of requirement set 1.5. It added the following features.
Added methods to get the entities or regular expression matches from the user's selection that activated a contextual add-in.
Important
This element or attribute value is documented to assist developers troubleshooting existing contextual Outlook add-ins. We recommend that you not create new contextual Outlook add-ins.
- Entity-based contextual Outlook add-ins are now retired.
- Scenarios that previously required regular expression rules in contextual add-ins can now be implemented with Event-based Outlook add-ins, which are activated automatically in response to events such as creating a new message or meeting. JavaScript has built-in support for regular expressions, and you can also reference JavaScript libraries that provide advanced regular expression functionality. Unlike contextual add-ins, Event-based add-ins can work in compose contexts as well as read mode.
Added a method to open a new message form.
Added support to determine the account type of the user's mailbox.
API list
The following table lists the APIs introduced in Mailbox requirement set 1.6. To view API reference documentation for all APIs supported by Mailbox requirement set 1.6 or earlier, see Outlook APIs.
| Class | Fields | Description |
|---|---|---|
| AppointmentRead | getSelectedEntities() | Gets the entities found in a highlighted match a user has selected. |
| getSelectedRegExMatches() | Returns string values in a highlighted match that match the regular expressions defined in an add-in only manifest file. | |
| Mailbox | displayNewMessageForm(parameters: MessageForm) | Displays a form for creating a new message. |
| MessageForm | attachments | Sets the attachments of the message. |
| bccRecipients | Sets the recipients in the Bcc field of the message. | |
| ccRecipients | Sets the recipients in the Cc field of the message. | |
| htmlBody | Sets the body of the message. | |
| subject | Sets the subject of the message. | |
| toRecipients | Sets the recipients in the To field of the message. | |
| MessageFormAttachment | isInline | If true, indicates that the attachment will be shown inline in the message body and won't be displayed in the attachment list. |
| itemId | The Exchange Web Services (EWS) item ID of the attachment. | |
| name | The name of the attachment. | |
| type | The type of attachment. | |
| url | The URI of the location for the file. | |
| MessageRead | getSelectedEntities() | Gets the entities found in a highlighted match a user has selected. |
| getSelectedRegExMatches() | Returns string values in a highlighted match that match the regular expressions defined in an add-in only manifest file. | |
| UserProfile | accountType | Gets the account type of the user associated with the mailbox. |
See also
Office Add-ins