Skip to content

Commit 5a69fae

Browse files
[Outlook] (initialization) Clarify note applicable to event-based activation and spam-reporting add-ins in classic Outlook on Windows (#5231)
* Clarify initialization not for event-based activation and spam reporting * Apply suggestions
1 parent dc1b57e commit 5a69fae

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

docs/outlook/autolaunch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Configure your Outlook add-in for event-based activation
33
description: Learn how to configure your Outlook add-in for event-based activation.
4-
ms.date: 06/12/2025
4+
ms.date: 06/17/2025
55
ms.topic: concept-article
66
ms.localizationpriority: medium
77
---
@@ -86,12 +86,12 @@ In the new Outlook on Windows, you must keep the main window of the client open
8686
When developing an event-based add-in to run in the classic Outlook on Windows client, be mindful of the following:
8787

8888
- Imports aren't supported in the JavaScript file where you implement the handling for event-based activation.
89-
- Add-ins don't run code included in `Office.onReady()` and `Office.initialize`. We recommend adding any startup logic, such as checking the user's Outlook version, to your event handlers instead.
9089
- Only the JavaScript file referenced in the manifest is supported for event-based activation. You must bundle your event-handling JavaScript code into this single file. The location of the referenced JavaScript file in the manifest varies depending on the type of manifest your add-in uses.
9190
- **Add-in only manifest**: **\<Override\>** child element of the **\<Runtime\>** node
9291
- **Unified manifest for Microsoft 365**: `"script"` property of the `"code"` object
9392

9493
Note that a large JavaScript bundle may cause issues with the performance of your add-in. We recommend preprocessing heavy operations, so that they're not included in your event-handling code.
94+
- When the JavaScript function specified in the manifest to handle an event runs, code in `Office.onReady()` and `Office.initialize` isn't run. We recommend adding any startup logic needed by event handlers, such as checking the user's Outlook version, to the event handlers instead.
9595

9696
### Unsupported APIs
9797

docs/outlook/onmessagefromchanged-onappointmentfromchanged-events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Automatically update your signature when switching between Exchange accounts
33
description: Learn how to automatically update your signature when switching between Exchange accounts through the OnMessageFromChanged and OnAppointmentFromChanged events in your event-based activation Outlook add-in.
4-
ms.date: 06/12/2025
4+
ms.date: 06/17/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -380,7 +380,7 @@ Event handlers must be configured for the `OnNewMessageCompose` and `OnMessageFr
380380
> [!IMPORTANT]
381381
>
382382
> - In classic Outlook on Windows, imports aren't supported in the JavaScript file where you implement the handling for event-based activation.
383-
> - Event-based add-ins running in classic Outlook on Windows don't run code included in the `Office.onReady()` and `Office.initialize` functions. We recommend adding your add-in startup logic, such as checking the user's Outlook version, to your event handlers instead.
383+
> - In classic Outlook on Windows, when the JavaScript function specified in the manifest to handle an event runs, code in `Office.onReady()` and `Office.initialize` isn't run. We recommend adding any startup logic needed by event handlers, such as checking the user's Outlook version, to the event handlers instead.
384384
> - To ensure your add-in runs as expected when an event occurs, call `Office.actions.associate` in the JavaScript file where your handlers are implemented. This maps the event handler name specified in the manifest to its JavaScript counterpart. The location of the handler name in the manifest differs depending on the type of manifest your add-in uses.
385385
> - **Unified manifest for Microsoft 365**: The value specified in the [`"actionId"`](/microsoft-365/extensibility/schema/extension-auto-run-events-array-events#actionid) property of the applicable [`"autoRunEvents.events"`](/microsoft-365/extensibility/schema/extension-auto-run-events-array-events) object.
386386
> - **Add-in only manifest**: The function name specified in the applicable [LaunchEvent](/javascript/api/manifest/extensionpoint#launchevent) element.

docs/outlook/smart-alerts-onmessagesend-walkthrough.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Automatically check for an attachment before a message is sent
33
description: Learn how to implement an event-based add-in that implements Smart Alerts to automatically check a message for an attachment before it's sent.
4-
ms.date: 06/12/2025
4+
ms.date: 06/17/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -324,6 +324,7 @@ In this scenario, you'll add handling for sending a message. Your add-in will ch
324324
> - To ensure your add-in runs as expected when an `OnMessageSend` or `OnAppointmentSend` event occurs, call `Office.actions.associate` in the JavaScript file where your handlers are implemented. This maps the event handler name specified in the manifest to its JavaScript counterpart. If this call isn't included in your JavaScript file and the send mode property of your manifest is set to **soft block** or isn't specified, your users will be blocked from sending messages or meetings. The location of the handler name in the manifest differs depending on the type of manifest your add-in uses.
325325
> - **Unified manifest for Microsoft 365**: The value specified in the [`"actionId"`](/microsoft-365/extensibility/schema/extension-auto-run-events-array-events#actionid) property of the applicable [`"autoRunEvents.events"`](/microsoft-365/extensibility/schema/extension-auto-run-events-array-events) object.
326326
> - **Add-in only manifest**: The function name specified in the applicable [LaunchEvent](/javascript/api/manifest/extensionpoint#launchevent) element.
327+
> - When the JavaScript function specified in the manifest to handle an event runs, code in `Office.onReady()` and `Office.initialize` isn't run. We recommend adding any startup logic needed by event handlers, such as checking the user's Outlook version, to the event handlers instead.
327328
> - The [errorMessageMarkdown](/javascript/api/outlook/office.smartalertseventcompletedoptions#outlook-office-smartalertseventcompletedoptions-errormessagemarkdown-member) property 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).
328329

329330
## Customize the text and functionality of a button in the dialog (optional)

docs/outlook/spam-reporting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Implement an integrated spam-reporting add-in
33
description: Learn how to implement an integrated spam-reporting add-in in Outlook.
4-
ms.date: 06/10/2025
4+
ms.date: 06/17/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -426,7 +426,7 @@ The following is a sample post-processing dialog shown to the user once the add-
426426
> As you develop a spam-reporting add-in that will run in Outlook on Windows, keep the following in mind.
427427
>
428428
> - Imports aren't currently supported in the JavaScript file that contains the code to handle the spam-reporting event.
429-
> - Code included in the `Office.onReady()` and `Office.initialize` functions won't run. You must add any add-in startup logic, such as checking the user's Outlook version, to your event handlers instead.
429+
> - When the JavaScript function specified in the manifest to handle the `SpamReporting` event runs, code in `Office.onReady()` and `Office.initialize` isn't run. We recommend adding any startup logic needed by the event handler, such as checking the user's Outlook version, to the event handler instead.
430430

431431
## Update the commands HTML file
432432

0 commit comments

Comments
 (0)