You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/outlook/item-multi-select.md
+8-19Lines changed: 8 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Activate your Outlook add-in on multiple messages
3
3
description: Learn how to activate your Outlook add-in when multiple messages are selected.
4
-
ms.date: 02/25/2025
4
+
ms.date: 03/11/2025
5
5
ms.topic: how-to
6
6
ms.localizationpriority: medium
7
7
---
@@ -47,7 +47,7 @@ Complete the [Outlook quick start](../quickstarts/outlook-quickstart-yo.md) to c
47
47
48
48
1. In first object of the "extensions.runtimes" array, make the following changes.
49
49
50
-
1. Change the "requirements.capabilities.minVersion" property to "1.13".
50
+
1. Change the "requirements.capabilities.minVersion" property to "1.15". Although the item multi-select feature was introduced in requirement set 1.13, this sample uses enhancements from later requirement sets.
51
51
1. In the same "actions" object, add the "supportsNoItemContext" property and set it to `true`.
52
52
1. In the same "actions" object, add the "multiselect" property and set it to `true`.
53
53
@@ -60,7 +60,7 @@ Complete the [Outlook quick start](../quickstarts/outlook-quickstart-yo.md) to c
60
60
"capabilities": [
61
61
{
62
62
"name": "Mailbox",
63
-
"minVersion": "1.13"
63
+
"minVersion": "1.15"
64
64
}
65
65
]
66
66
},
@@ -111,7 +111,7 @@ To enable your add-in to activate on multiple selected messages, you must add th
@@ -194,15 +194,6 @@ Item multi-select relies on the [SelectedItemsChanged](/javascript/api/office/of
194
194
</main>
195
195
```
196
196
197
-
1. For classic Outlook on Windows only. Replace the existing **script** element with the following markup. This references the preview version of the Office JavaScript API.
> The preview version of the Office JavaScript API is used because this walkthrough implements the `loadItemByIdAsync` and `unloadAsync` methods, which are currently in preview. If your multi-select add-in doesn't implement these methods, use `https://appsforoffice.microsoft.com/lib/1/hosted/office.js` instead. For more information, see [Referencing the Office JavaScript API library](../develop/referencing-the-javascript-api-for-office-library-from-its-cdn.md).
205
-
206
197
1. Save your changes.
207
198
208
199
## Implement a handler for the SelectedItemsChanged event
@@ -250,16 +241,15 @@ Now that you've registered an event handler, your add-in can now get properties
250
241
- Item mode (`Read` or `Compose`)
251
242
- Item type (`Message` is the only supported type at this time)
252
243
- Subject line
253
-
- Call the [loadItemByIdAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-preview&preserve-view=true#outlook-office-mailbox-loaditembyidasync-member(1)) method (preview) to get properties that aren't provided by `getSelectedItemsAsync` or to run operations on the selected messages. The `loadItemByIdAsync` method loads one selected message at a time using the message's Exchange Web Services (EWS) ID. To get the EWS IDs of the selected messages, we recommend calling `getSelectedItemsAsync`. After processing a selected message using `loadItemByIdAsync`, you must call the [unloadAsync](/javascript/api/outlook/office.loadedmessageread?view=outlook-js-preview&preserve-view=true#outlook-office-loadedmessageread-unloadasync-member(1)) method (preview) before calling `loadItemByIdAsync` on another selected message.
244
+
- Call the [loadItemByIdAsync](/javascript/api/outlook/office.mailbox?view=outlook-js-1.15&preserve-view=true#outlook-office-mailbox-loaditembyidasync-member(1)) method to get properties that aren't provided by `getSelectedItemsAsync` or to run operations on the selected messages. The `loadItemByIdAsync` method loads one selected message at a time using the message's Exchange Web Services (EWS) ID. To get the EWS IDs of the selected messages, we recommend calling `getSelectedItemsAsync`. After processing a selected message using `loadItemByIdAsync`, you must call the [unloadAsync](/javascript/api/outlook/office.loadedmessageread?view=outlook-js-1.15&preserve-view=true#outlook-office-loadedmessageread-unloadasync-member(1)) method before calling `loadItemByIdAsync` on another selected message.
254
245
255
246
> [!TIP]
256
-
> Before you use the `loadItemByIdAsync` method, determine if you can already access the properties you need using `getSelectedItemsAsync`. If you can, you don't need to call `loadItemByIdAsync`.
247
+
>
248
+
> - The `loadItemByIdAsync` and `unloadAsync` methods were introduced in [requirement set 1.15](/javascript/api/requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15). Learn more about its [supported clients and platforms](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets#outlook-client-support).
249
+
> - Before you use the `loadItemByIdAsync` method, determine if you can already access the properties you need using `getSelectedItemsAsync`. If you can, you don't need to call `loadItemByIdAsync`.
257
250
258
251
The following example implements the `getSelectedItemsAsync` and `loadItemByIdAsync` methods to get the subject line and sender's email address from each selected message.
259
252
260
-
> [!NOTE]
261
-
> The `loadItemByIdAsync` method is currently in preview in classic Outlook on Windows. To preview this API, install Version 2405 (Build 17606.10000) or later. Then, join the [Microsoft 365 Insider program](https://techcommunity.microsoft.com/blog/microsoft365insiderblog/join-the-microsoft-365-insider-program-on-windows/4206638) and select the **Beta Channel** option.
262
-
263
253
1. In **taskpane.js**, replace the existing `run` function with the following code.
264
254
265
255
```javascript
@@ -283,7 +273,6 @@ The following example implements the `getSelectedItemsAsync` and `loadItemByIdAs
283
273
async function getItemInfo(selectedItems) {
284
274
for (const item of selectedItems) {
285
275
addToList(item.subject);
286
-
// The loadItemByIdAsync method is currently only available to preview in classic Outlook on Windows.
287
276
if (Office.context.diagnostics.platform === Office.PlatformType.PC) {
Copy file name to clipboardExpand all lines: docs/outlook/one-outlook.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Develop Outlook add-ins for the new Outlook on Windows
3
3
description: Learn how to develop add-ins that are compatible with the new Outlook on Windows.
4
-
ms.date: 08/16/2024
4
+
ms.date: 03/11/2025
5
5
ms.localizationpriority: medium
6
6
---
7
7
@@ -36,7 +36,7 @@ The following table identifies key Outlook scenarios and their support status in
36
36
37
37
|Scenario|Description|Support status in Outlook web add-ins|Related features and samples|
38
38
|-----|-----|-----|-----|
39
-
|Spam email reporting and education|Enable users to report unsolicited and potentially unsafe messages and learn how to identify these messages.|Supported. Improvements are in development to further enhance the user experience.|<ul><li>[Implement an integrated spam-reporting add-in](spam-reporting.md)</li><li>[ReportPhishingCommandSurface extension point](/javascript/api/manifest/extensionpoint#reportphishingcommandsurface)</li><li>[Office.context.mailbox.item.getAsFileAsync](/javascript/api/outlook/office.messageread#outlook-office-messageread-getasfileasync-member(1))</li></ul>|
39
+
|Spam email reporting and education|Enable users to report unsolicited and potentially unsafe messages and learn how to identify these messages.|Supported.|<ul><li>[Implement an integrated spam-reporting add-in](spam-reporting.md)</li><li>[ReportPhishingCommandSurface extension point](/javascript/api/manifest/extensionpoint#reportphishingcommandsurface)</li><li>[Office.context.mailbox.item.getAsFileAsync](/javascript/api/outlook/office.messageread#outlook-office-messageread-getasfileasync-member(1))</li></ul>|
40
40
|Online meetings|Enable users to create and join online meetings.|Supported.|<ul><li>[Create an Outlook add-in for an online-meeting provider](online-meeting.md)</li><li>[Implement shared folders and shared mailbox scenarios in an Outlook add-in](delegate-access.md)</li><li>[Office.context.mailbox.item.getSharedPropertiesAsync](/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item)</li><li>[Office.SharedProperties](/javascript/api/outlook/office.sharedproperties)</li></ul>|
41
41
|Meeting enhancements|Provide additional services for users when they schedule meetings, such as location selection, catering services, and room lighting and temperature adjustments.|Supported.|<ul><li>[Configure your Outlook add-in for event-based activation](autolaunch.md)</li><li>[Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts](smart-alerts-onmessagesend-walkthrough.md)</li><li>[Office.context.mailbox.item.enhancedLocation](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-enhancedlocation-member)</li></ul>|
42
42
|Online signatures|Automatically add themed signatures to messages and appointments.|Supported.|<ul><li>[Automatically update your signature when switching between Exchange accounts](onmessagefromchanged-onappointmentfromchanged-events.md)</li><li>[Implement event-based activation in Outlook mobile add-ins](mobile-event-based.md)</li><li>[Use Outlook event-based activation to set the signature](https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/outlook-set-signature)</li><li>[Office.context.mailbox.item.loadCustomPropertiesAsync](/javascript/api/requirement-sets/outlook/preview-requirement-set/office.context.mailbox.item#methods)</li><li>[Office.context.mailbox.item.body.setSignatureAsync](/javascript/api/outlook/office.body#outlook-office-body-setsignatureasync-member(1))</li></ul>|
@@ -46,7 +46,7 @@ The following table identifies key Outlook scenarios and their support status in
46
46
|Project management|Enable users to create and track project work items from partner systems.|Supported.|<ul><li>[Activate your Outlook add-in on multiple messages](item-multi-select.md)</li><li>[Activate your Outlook add-in without the Reading Pane enabled or a message selected](contextless.md)</li><li>[Verify the color categories applied to a new message or appointment](https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/outlook-check-item-categories)</li></ul>|
47
47
|Attachment management|Enable users to import or export attachments from partner locations.|Supported.|<ul><li>[Activate your Outlook add-in on multiple messages](item-multi-select.md)</li><li>[Activate your Outlook add-in without the Reading Pane enabled or a message selected](contextless.md)</li><li>[Configure your Outlook add-in for event-based activation](autolaunch.md)</li></ul>|
48
48
|Message encryption|Enable users to encrypt and decrypt messages.|Partially supported. Essential features are yet to be addressed to create a similar experience to VSTO or COM add-ins.|<ul><li>[Office.context.mailbox.item.display](/javascript/api/outlook/office.messageread?view=outlook-js-preview&preserve-view=true#outlook-office-messageread-display-member) (preview)</li><li>[Office.context.mailbox.item.display.body.setAsync](/javascript/api/outlook/office.displayedbody?view=outlook-js-preview&preserve-view=true#outlook-office-displayedbody-setasync-member(1)) (preview)</li><li>[Office.context.mailbox.item.display.subject.setAsync](/javascript/api/outlook/office.displayedsubject#outlook-office-displayedsubject-setasync-member(1)) (preview)</li></ul>|
49
-
|Data loss prevention|Prevent users from forwarding mail items that contain highly sensitive information.|Partially supported. Essential features are yet to be addressed to create a similar experience to VSTO or COM add-ins.|<ul><li>[Automatically check for an attachment before a message is sent](smart-alerts-onmessagesend-walkthrough.md)</li><li>[Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts](onmessagesend-onappointmentsend-events.md)</li><li>[Manage the sensitivity label of your message or appointment in compose mode](sensitivity-label.md)</li><li>[Verify the sensitivity label of a message](https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/outlook-verify-sensitivity-label)</li><li>[Office.SensitivityLabel](/javascript/api/outlook/office.sensitivitylabelscatalog)</li><li>[Office.SensitivitiyLabelsCatalog](/javascript/api/outlook/office.sensitivitylabelscatalog)</li><li>[Office.SensitivityLabelDetails](/javascript/api/outlook/office.sensitivitylabeldetails)</li><li>[Office.context.mailbox.item.closeAsync](/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-closeasync-member(1))</li><li>[Office.context.mailbox.item.inReplyTo](/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-inreplyto-member)</li><li>[Office.context.mailbox.item.getConversationIndexAsync](/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-getconversationindexasync-member(1))</li><li>[Office.context.mailbox.item.getItemClassAsync](/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-getitemclassasync-member(1))</li></ul>|
49
+
|Data loss prevention|Prevent users from forwarding mail items that contain highly sensitive information.|Supported.|<ul><li>[Automatically check for an attachment before a message is sent](smart-alerts-onmessagesend-walkthrough.md)</li><li>[Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts](onmessagesend-onappointmentsend-events.md)</li><li>[Manage the sensitivity label of your message or appointment in compose mode](sensitivity-label.md)</li><li>[Verify the sensitivity label of a message](https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/outlook-verify-sensitivity-label)</li><li>[Office.SensitivityLabel](/javascript/api/outlook/office.sensitivitylabelscatalog)</li><li>[Office.SensitivitiyLabelsCatalog](/javascript/api/outlook/office.sensitivitylabelscatalog)</li><li>[Office.SensitivityLabelDetails](/javascript/api/outlook/office.sensitivitylabeldetails)</li><li>[Office.context.mailbox.item.closeAsync](/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-closeasync-member(1))</li><li>[Office.context.mailbox.item.inReplyTo](/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-inreplyto-member)</li><li>[Office.context.mailbox.item.getConversationIndexAsync](/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-getconversationindexasync-member(1))</li><li>[Office.context.mailbox.item.getItemClassAsync](/javascript/api/outlook/office.messagecompose#outlook-office-messagecompose-getitemclassasync-member(1))</li></ul>|
50
50
|Mail item classification|Enable users to identify and classify messages that contain sensitive information.|Partially supported. Essential features are yet to be addressed to create a similar experience to VSTO or COM add-ins.|<ul><li>[Automatically check for an attachment before a message is sent](smart-alerts-onmessagesend-walkthrough.md)</li><li>[Handle OnMessageSend and OnAppointmentSend events in your Outlook add-in with Smart Alerts](onmessagesend-onappointmentsend-events.md)</li><li>[Manage the sensitivity label of your message or appointment in compose mode](sensitivity-label.md)</li><li>[Manage the sensitivity level of an appointment](/javascript/api/outlook/office.sensitivity)</li><li>[Office.Sensitivity](/javascript/api/outlook/office.sensitivity)</li><li>[Office.SensitivityLabel](/javascript/api/outlook/office.sensitivitylabelscatalog)</li><li>[Office.SensitivitiyLabelsCatalog](/javascript/api/outlook/office.sensitivitylabelscatalog)</li><li>[Office.SensitivityLabelDetails](/javascript/api/outlook/office.sensitivitylabeldetails)</li></ul>|
51
51
|Data sync service|Enable bidirectional synchronization of mail items with partner systems.|Partially supported. Essential features are yet to be addressed to create a similar experience to VSTO or COM add-ins.|<ul><li>[Use Microsoft Graph to manage personal contacts in Outlook](/graph/outlook-contacts-concept-overview)</li></ul>|
52
52
|Proofing mail items|Provide users with real-time proofreading assistance as they compose messages.|Not currently supported.|Not available|
> Enhancements to the Smart Alerts feature were introduced in later requirement sets. Because of this, the minimum supported Outlook version and build may vary. The requirement sets and versions needed for a feature are mentioned in the [walkthrough](smart-alerts-onmessagesend-walkthrough.md) and applicable sections of this article.
33
+
31
34
## Try out Smart Alerts in an event-based add-in
32
35
33
36
To see Smart Alerts in action, try out the [walkthrough](smart-alerts-onmessagesend-walkthrough.md). You'll create an add-in that checks whether a document or picture is attached to a message before it's sent. In addition to implementing a basic Smart Alerts add-in, you'll also learn about the following functionalities to further enhance the user experience of your add-in.
@@ -243,11 +246,9 @@ In Outlook on the web and in new Outlook on Windows:
243
246
### Limitations to formatting the dialog message using Markdown
244
247
245
248
> [!NOTE]
246
-
> Support for Markdown in a Smart Alerts dialog is currently in preview in Outlook on the web and on Windows (new and classic). Features in preview shouldn't be used in production add-ins. We invite you to try out this feature in test or development environments and welcome feedback on your experience through GitHub (see the Feedback section at the end of this page).
247
-
>
248
-
> To test this feature in classic Outlook on Windows, you must install Version 2403 (Build 17330.10000) or later. Then, join the [Microsoft 365 Insider program](https://techcommunity.microsoft.com/blog/microsoft365insiderblog/join-the-microsoft-365-insider-program-on-windows/4206638) and select the **Beta Channel** option in your Outlook client to access Office beta builds.
249
+
> Support for Markdown in a Smart Alerts dialog was introduced in [requirement set 1.15](/javascript/api/requirement-sets/outlook/requirement-set-1.15/outlook-requirement-set-1.15). Learn more about its [supported clients and platforms](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets#outlook-client-support).
249
250
250
-
You can use Markdown to format the message of a Smart Alerts dialog. However, only the following elements are supported.
251
+
You can use Markdown to format the message of a Smart Alerts dialog through the `errorMessageMarkdown` option of the `event.completed` call. However, only the following elements are supported.
251
252
252
253
- Bold, italic, or bold and italic text. Both the [asterisk (*) and underscore (_) formats](https://www.markdownguide.org/basic-syntax/#emphasis) are supported.
0 commit comments