Context object (JavaScript API for Office)

apps for Office

Represents the runtime environment of the app and provides access to key objects of the API.

Last modified: February 27, 2015

Hosts:

Access, Excel, Outlook, PowerPoint, Project, Word

Last changed in

1.1

See all support details

Office.context

Properties

Name

Description

contentLanguage

Gets the locale (language) for data as it is stored in the document or item.

displayLanguage

Gets the locale (language) for the UI of the hosting application.

document

Gets an object that represents the document the content or task pane app is interacting with.

mailbox

Gets the mailbox object that provides access to members of the API that are specifically for mail apps.

roamingSettings

Gets an object that represents the saved custom settings of the app.

The Context object provides access to key objects in the JavaScript API for Office.

A checkmark (√) in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method.

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

Office for Windows desktop

Office for Windows RT

Office Online
(in browser)

Outlook for Mac

Access

Excel

Outlook

PowerPoint

Project

Word

Minimum permission level

Restricted

App types

Content, mail, task pane

Library

Office.js

Namespace

Office

Version

Changes

1.1

For contentLanguage, displayLanguage, and document, added support for content apps for Access.

1.0

Introduced

Show:
© 2015 Microsoft