Office object

Represents an instance of an add-in, which provides access to the top-level objects of the API.

Hosts: Access, Excel, Outlook, PowerPoint, Project, Word
Last changed in 1.1



Name Description
context Gets the Context object that represents the runtime environment of the add-in and provides access to the top-level objects of the API.
cast.item Provides IntelliSense in Visual Studio specific to compose or read mode messages and appointments.

Note Only applicable at design time when developing Outlook add-ins in Visual Studio.


Name Description
select Creates a promise to return a binding based on the selector string passed in.
useShortNamespace Toggles on and off the Office alias for the full Microsoft.Office.WebExtension namespace.


Name Description
initialize Occurs when the runtime environment is loaded and the add-in is ready to start interacting with the application and hosted document.


The Office object enables the developer to implement a callback function for the Initialize event and provides access to the Context object.

Support details

A capital Y in the following matrix indicates that this object is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this object.

For more information about Office host application and server requirements, see Requirements for running Office Add-ins.

Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Outlook for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
Add-in types Content, Outlook, task pane
Library Office.js
Namespace Office

Support history

Version Changes
1.1 Added support for Excel, PowerPoint, and Word in Office for iPad.
  • For context, added support for getting the runtime context in content add-ins for Access.

  • For select, added support for selecting table bindings in content add-ins for Access.

  • For useShortNamespace, added support for content add-ins for Access.
  • For initialize, added support for initialization in content add-ins for Access.
1.0 Introduced