Document.bindings property (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Gets an object that provides access to the bindings defined in the document.

Last modified: June 12, 2014

Introduced in Office.js version

1.0

Updated in Office.js version

1.1

var docBindings = Office.context.document.bindings;

function displayAllBindings() {
    Office.context.document.bindings.getAllAsync(function (asyncResult) {
        var bindingString = '';
        for (var i in asyncResult.value) {
            bindingString += asyncResult.value[i].id + '\n';
        }
        write('Existing bindings: ' + bindingString);
    });
}

// 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 2013 SP1, Excel 2013 RT, Excel Online, Word 2013, Word 2013 SP1, Word 2013 RT

Library

Office.js

Namespace

Office

Show:
© 2014 Microsoft