Skip to content

[Outlook] (initialization) Clarify note applicable to event-based activation and spam-reporting add-ins in classic Outlook on Windows #5231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/outlook/autolaunch.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Configure your Outlook add-in for event-based activation
description: Learn how to configure your Outlook add-in for event-based activation.
ms.date: 06/12/2025
ms.date: 06/17/2025
ms.topic: concept-article
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -86,12 +86,12 @@ In the new Outlook on Windows, you must keep the main window of the client open
When developing an event-based add-in to run in the classic Outlook on Windows client, be mindful of the following:

- Imports aren't supported in the JavaScript file where you implement the handling for event-based activation.
- 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.
- 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.
- **Add-in only manifest**: **\<Override\>** child element of the **\<Runtime\>** node
- **Unified manifest for Microsoft 365**: `"script"` property of the `"code"` object

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.
- 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.

### Unsupported APIs

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Automatically update your signature when switching between Exchange accounts
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.
ms.date: 06/12/2025
ms.date: 06/17/2025
ms.topic: how-to
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -380,7 +380,7 @@ Event handlers must be configured for the `OnNewMessageCompose` and `OnMessageFr
> [!IMPORTANT]
>
> - In classic Outlook on Windows, imports aren't supported in the JavaScript file where you implement the handling for event-based activation.
> - 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.
> - 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.
> - 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.
> - **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.
> - **Add-in only manifest**: The function name specified in the applicable [LaunchEvent](/javascript/api/manifest/extensionpoint#launchevent) element.
Expand Down
3 changes: 2 additions & 1 deletion docs/outlook/smart-alerts-onmessagesend-walkthrough.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Automatically check for an attachment before a message is sent
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.
ms.date: 06/12/2025
ms.date: 06/17/2025
ms.topic: how-to
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -324,6 +324,7 @@ In this scenario, you'll add handling for sending a message. Your add-in will ch
> - 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.
> - **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.
> - **Add-in only manifest**: The function name specified in the applicable [LaunchEvent](/javascript/api/manifest/extensionpoint#launchevent) element.
> - 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.
> - 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).

## Customize the text and functionality of a button in the dialog (optional)
Expand Down
4 changes: 2 additions & 2 deletions docs/outlook/spam-reporting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Implement an integrated spam-reporting add-in
description: Learn how to implement an integrated spam-reporting add-in in Outlook.
ms.date: 06/10/2025
ms.date: 06/17/2025
ms.topic: how-to
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -426,7 +426,7 @@ The following is a sample post-processing dialog shown to the user once the add-
> As you develop a spam-reporting add-in that will run in Outlook on Windows, keep the following in mind.
>
> - Imports aren't currently supported in the JavaScript file that contains the code to handle the spam-reporting event.
> - 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.
> - 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.

## Update the commands HTML file

Expand Down