JavaScript API for Office

The JavaScript API for Office enables you to create web applications that interact with the object models in Office host applications. Your application will reference the office.js library, which is a script loader. The office.js library loads the object models that are applicable to the Office application that is running the add-in. You can use the following JavaScript object models:

  • Common APIs - APIs that were introduced with Office 2013. This is loaded for all Office host applications and connects your add-in application with the Office client application. The object model contains APIs that are specific to Office clients, and APIs that are applicable to multiple Office client host applications. All of this content is under Common API. This object model uses callbacks.

    Outlook also uses the Common API syntax. Everything under the alias Office contains objects you can use to write scripts that interact with content in Office documents, worksheets, presentations, mail items, and projects from your Office Add-ins. You must use these Common APIs if your add-in will target Office 2013 and later. This object model uses callbacks.

  • Host-specific APIs - APIs that were introduced with Office 2016. This object model provides host-specific strongly-typed objects that correspond to familiar objects that you see when you use Office clients, and represents the future of Office JavaScript APIs. Host-specific JavaScript APIs are currently available for Excel, OneNote, PowerPoint, and Word.

Supported host applications


Project supports add-ins made with the JavaScript API, but there's currently no JavaScript API designed specifically for interacting with Project. You can use the Common API to create Project add-ins.

Learn more about supported hosts and other requirements.

Open API specifications

As we design and develop new APIs for Office Add-ins, we'll make them available for your feedback on our Open API specifications page. Find out what new features are in the pipeline, and provide your input on our design specifications.

See also