Settings.get method (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Retrieves the specified setting.

Last modified: June 12, 2014

Available in requirement sets

Settings

var mySetting = Office.context.document.setting.get(name);

name

Type: string

The case-sensitive name of the setting to retrieve.

An object that has property names mapped to JSON serialized values.

In version 1.1 of Office.js, you can create settings in content apps for Access.

function displayMySetting() {
    write('Current value for mySetting: ' + Office.context.document.settings.get('mySetting'));
}
// Function that writes to a div with id='message' on the page.
function write(message){
    document.getElementById('message').innerText += message; 
}

App types

Content apps, Task pane apps

Supported clients

Access app for SharePoint, Excel 2013, Excel Online, Excel 2013 SP1, Excel 2013 RT, Word 2013, Word 2013 SP1, Word 2013 RT, PowerPoint 2013, PowerPoint 2013 SP1, PowerPoint 2013 RT

Library

Office.js

Namespace

Office

Show:
© 2014 Microsoft