Skip to content

OfficeDev/office-js

Repository files navigation

Office JavaScript APIs for Office Add-ins

Use Office.js amd the Office Add-ins platform to build solutions that extend Office applications and interact with content in Office documents and in Outlook mail messages and calendar items. With Office Add-ins, you can use familiar web technologies such as HTML, CSS, and JavaScript to build solutions that can run in Office on the web, Windows, Mac, and mobile. You'll find walkthroughs, samples, and more information in the official Office Add-ins documentation.

This repository

This GitHub repository is primarily used to report issues found in the Office JavaScript APIs. The NPM package associated with this repo is no longer officially supported. Your add-in should get the JavaScript library from the Office content delivery network (CDN), as described in the section Reference Office.js from the CDN. This ensures that essential product updates are served quickly to the Office Add-ins. Given that the latest Office.js release is backward-compatible with prior releases, it's safe to update to the most recent release of the library when one is available. If you need to access the library in a secure cloud environment, download the necessary files from the CDN and bundle them with your add-in.

Report issues

If you believe you have found an issue (bug) with the Office JavaScript APIs, please visit the issues tab of this repo. If your issue is already reported, consider adding additional context or reproduction steps. Otherwise, select New issue, choose Bug report, and provide as much detail as possible. A member of our team will respond within 1-2 business days.

Feature requests

Requests for new platform features should be raised at the Microsoft 365 Developer Platform Tech Community site. Upvoted requests will be considered by our team for inclusion into the product.

Other questions

Questions about developing add-ins and how to use the APIs should be raised on Stack Overflow with the "office-js" tag or on Microsoft Q&A with the "Office Development" tag. These locations are monitored by a community of experts, which includes members of our product team. They will review questions and provide assistance as they are able.

Reference Office.js from the CDN

The Office CDN is the official supported source for Office Add-ins. Reference the Office.js library in the CDN by adding the following <script> tag within the <head> section of your HTML page.

<head>
    ...
    <script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
</head>

This will download and cache the Office JavaScript API files the first time your add-in loads to make sure that it is using the most up-to-date implementation of Office.js and its associated files for the specified version. For more information, including how to reference preview APIs, see Referencing the Office JavaScript API library.

Government clouds may need to reference a special version of the CDN. For more information, see Guidance for deploying Office Add-ins on government clouds.

IntelliSense definitions

TypeScript definitions for Office.js are available on DefinitelyTyped.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

More info

For more information on Office Add-ins and the Office JavaScript APIs, see:

Join the Microsoft 365 Developer Program

Join the Microsoft 365 Developer Program to get resources and information to help you build solutions for the Microsoft 365 platform, including recommendations tailored to your areas of interest.

You might also qualify for a free developer subscription that's renewable for 90 days and comes configured with sample data; for details, see the FAQ.