Skip to content

[Word, Excel, PowerPoint] Event-based activation walkthrough #5261

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 23 commits into from
Jul 2, 2025

Conversation

AlexJerabek
Copy link
Collaborator

This article describes the new event-based activation feature for WXP. It provides a walkthrough on the currently supported onDocumentOpened event in Word.

@AlexJerabek AlexJerabek requested a review from Copilot June 27, 2025 21:27
Copilot

This comment was marked as outdated.

Copy link
Contributor

Learn Build status updates of commit e56eab6:

💡 Validation status: suggestions

File Status Preview URL Details
docs/develop/WXP-event-based-activation.md 💡Suggestion View Details
docs/toc.yml ✅Succeeded View

docs/develop/WXP-event-based-activation.md

  • Line 0, Column 0: [Suggestion: filename-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in filenames.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copy link
Contributor

Learn Build status updates of commit eb6d9f6:

💡 Validation status: suggestions

File Status Preview URL Details
docs/develop/WXP-event-based-activation.md 💡Suggestion View Details
docs/toc.yml ✅Succeeded View

docs/develop/WXP-event-based-activation.md

  • Line 0, Column 0: [Suggestion: filename-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in filenames.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copy link
Contributor

Learn Build status updates of commit e9887a8:

💡 Validation status: suggestions

File Status Preview URL Details
docs/develop/WXP-event-based-activation.md 💡Suggestion View Details
docs/toc.yml ✅Succeeded View

docs/develop/WXP-event-based-activation.md

  • Line 0, Column 0: [Suggestion: filename-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in filenames.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@AlexJerabek AlexJerabek requested a review from alison-mk June 27, 2025 23:12
Copy link
Contributor

Learn Build status updates of commit 27d1701:

💡 Validation status: suggestions

File Status Preview URL Details
docs/develop/WXP-event-based-activation.md 💡Suggestion View Details
docs/toc.yml ✅Succeeded View

docs/develop/WXP-event-based-activation.md

  • Line 0, Column 0: [Suggestion: filename-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in filenames.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@AlexJerabek AlexJerabek marked this pull request as ready for review June 30, 2025 16:14
@AlexJerabek AlexJerabek requested a review from Copilot June 30, 2025 16:14
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces documentation for the new event-based activation feature for Word, Excel, and PowerPoint add-ins, including a walkthrough on handling the onDocumentOpened event.

  • Updated table of contents to include a new section for non-Outlook event-based activation.
  • Added a detailed walkthrough document with manifest configuration, event handler code, and testing instructions.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs/toc.yml Added a new TOC entry for implementing event-based activation
docs/develop/WXP-event-based-activation.md New walkthrough document explaining event-based activation for add-ins
Comments suppressed due to low confidence (1)

docs/toc.yml:122

  • The new TOC item is missing an 'href' property which is required for navigation consistency with other entries. Consider adding the appropriate 'href' linking to the walkthrough document.
      - name: Implement event-based activation in non-Outlook add-ins 

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Learn Build status updates of commit 431d1c4:

💡 Validation status: suggestions

File Status Preview URL Details
docs/develop/WXP-event-based-activation.md 💡Suggestion View Details
docs/toc.yml ✅Succeeded View

docs/develop/WXP-event-based-activation.md

  • Line 0, Column 0: [Suggestion: filename-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in filenames.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copy link
Contributor

Learn Build status updates of commit 373346c:

💡 Validation status: suggestions

File Status Preview URL Details
docs/develop/WXP-event-based-activation.md 💡Suggestion View Details
docs/toc.yml ✅Succeeded View

docs/develop/WXP-event-based-activation.md

  • Line 0, Column 0: [Suggestion: filename-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in filenames.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

ms.localizationpriority: medium
---

# Implement event-based activation in Excel, PowerPoint, and Word add-ins
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this feature is in preview, we should add that to the title.

Suggested change
# Implement event-based activation in Excel, PowerPoint, and Word add-ins
# Implement event-based activation in Excel, PowerPoint, and Word add-ins (preview)

If it is not in preview, let's position it as the generic overview for the feature for all Office apps. There's a note directing readers to the special Outlook article.

Suggested change
# Implement event-based activation in Excel, PowerPoint, and Word add-ins
# Implement event-based activation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I planned on integrating this article with the Outlook one in a more thorough way, but the feature is GA and I want to get something out. If you think I should not have this middle state, I'll reconcile it now.

Copy link
Contributor

@Rick-Kirkham Rick-Kirkham Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Let's wait till you think it's the right time.


1. Run `npm run build` to rebuild the project.
1. Run `npm start` to launch the web server. **Ignore the Word document that is opened**.
1. Manually sideload your add-in in Word on the web by following the guidance at [Sideload Office Add-ins to Office on the web](../testing/sideload-office-add-ins-for-testing.md#manually-sideload-an-add-in-to-office-on-the-web).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I right in thinking that we sideload on the web because sideloading on Windows is not Centrally Deployed, so it wouldn't work? If so, I think we should explain that here. If not, why do we not sideload on Windows as we do in most quickstarts/tutorials?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The auto-sideload npm start performs doesn't (seem to) work. There doesn't appear to be a way to sideload on Windows without using a network share any more. That process I find to be a ton of work and if someone if just loading the add-in to test, they're better off using the browser, IMO.

image

I'll add a comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've sent mail to @wangyun-microsoft about this.

AlexJerabek and others added 3 commits June 30, 2025 13:14
Copy link
Contributor

Learn Build status updates of commit 228a1da:

💡 Validation status: suggestions

File Status Preview URL Details
docs/develop/WXP-event-based-activation.md 💡Suggestion View Details
docs/toc.yml ✅Succeeded View

docs/develop/WXP-event-based-activation.md

  • Line 0, Column 0: [Suggestion: filename-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in filenames.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@AlexJerabek AlexJerabek requested a review from Rick-Kirkham June 30, 2025 20:27
Copy link
Contributor

Learn Build status updates of commit c350c5f:

💡 Validation status: suggestions

File Status Preview URL Details
docs/develop/WXP-event-based-activation.md 💡Suggestion View Details
docs/toc.yml ✅Succeeded View

docs/develop/WXP-event-based-activation.md

  • Line 0, Column 0: [Suggestion: filename-invalid-character - See documentation] Only lowercase letters, numbers, and hyphens are allowed in filenames.
  • Line 0, Column 0: [Suggestion: filename-incomplete - See documentation] The filename contains an incomplete word, misspelled word, acronym, or abbreviation that is disallowed.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

Copy link
Contributor

@Rick-Kirkham Rick-Kirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, but I still think the "build" step is unneeded.

Copy link
Contributor

Learn Build status updates of commit 008aea3:

✅ Validation status: passed

File Status Preview URL Details
docs/develop/event-based-activation.md ✅Succeeded View
docs/toc.yml ✅Succeeded View

For more details, please refer to the build report.

Copy link
Contributor

Learn Build status updates of commit 6cebca6:

✅ Validation status: passed

File Status Preview URL Details
docs/develop/event-based-activation.md ✅Succeeded View
docs/toc.yml ✅Succeeded View

For more details, please refer to the build report.

Co-authored-by: Elizabeth Samuel <elizs@microsoft.com>
@AlexJerabek
Copy link
Collaborator Author

Thanks @ElizabethSamuel-MSFT! I've reviewed and applied your suggestions. Good to check in?

Copy link
Contributor

Learn Build status updates of commit 9dbd40d:

✅ Validation status: passed

File Status Preview URL Details
docs/develop/event-based-activation.md ✅Succeeded View
docs/toc.yml ✅Succeeded View

For more details, please refer to the build report.

@AlexJerabek AlexJerabek merged commit f0a599e into main Jul 2, 2025
2 checks passed
@AlexJerabek AlexJerabek deleted the WXP-event-based-activation branch July 2, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants