Skip to content

Files

Latest commit

 

History

History

hello-world-office-addin

page_type languages products name urlFragment description extensions
sample
typescript
office
Hello World Office add-in
officedev-teamsfx-samples-hello-world-office-add-in
A hello world project that contains Office add-in capability.
createdDate
2024-12-06

Getting Started with Hello World Office Add-in Sample

Office add-ins are integrations built by third parties into Office by using our web-based platform.

Now you have the ability to create a single unit of distribution for all your Office applications by using the same manifest format and schema, based on the current JSON-formatted MetaOS manifest.

This sample illustrates

  • How to create an Office add-in with a unified manifest that works on Word, Excel, Powerpoint, and Outlook.

Note

The unified app manifest for Word, Excel, and PowerPoint is in preview. Visit this link to check the required Office Versions. Also, publishing a unified add-in for Word, Excel, PowerPoint is not supported currently.

Prerequisites to use this sample

Minimal path to awesome

Debug Office add-in

Please note that the same M365 account should be used both in Teams Toolkit and Office Applications (Word, Excel, Powerpoint, Outlook).

The following steps show Excel as an example, and the other Office applications share the same behavior.

  • From Visual Studio Code only: use the Run and Debug Activity Panel in Visual Studio Code, select Debug in Excel Desktop (Edge Chromium), and click the Run and Debug green arrow button. Please run VSCode as administrator if localhost loopback for Microsoft Edge Webview hasn't been enabled. Once enbaled, administrator priviledge is no longer required.

    Visual Studio Code debug configuration for Office

  • Once the Office app is open, you can select the ribbon command to show the add-in task pane. Excel add-in show taskpane

  • The taskpane opens and you can check the sideloaded add-in. Excel add-in task pane opened

Edit the manifest

You can find the app manifest in ./appPackage folder. The folder contains the manifest file: manifest.json: Manifest file for Office add-in running locally.

You may add any extra properties or permissions you require to this file. See the schema reference for more information.

Validate manifest file

To check that your manifest file is valid:

  • From Visual Studio Code: open the command palette and select: Teams: Validate Application and select Validate using manifest schema.
  • From Teams Toolkit CLI: run command teamsapp validate in your project directory.

Version History

Date Author Comments
Dec 06, 2024 hermanwen Init sample

Feedback

We really appreciate your feedback! If you encounter any issue or error, please report issues to us following the Supporting Guide. Meanwhile you can make recording of your journey with our product, they really make the product better. Thank you!