array, boolean, null, number, object, string, or undefined
A user-defined item of any type that is returned in the AsyncResult object without being altered.
callback
object
A function that is invoked when the callback returns, whose only parameter is of type AsyncResult.
Callback Value
When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback function's only parameter.
In the callback function passed to the getAllAsync method, you can use the properties of the AsyncResult object to return the following information.
Access your user-defined object or value, if you passed one as the asyncContext parameter.
Example
functiondisplayAllBindingNames() {
Office.context.document.bindings.getAllAsync(function (asyncResult) {
var bindingString ='';
for (var i inasyncResult.value) {
bindingString +=asyncResult.value[i].id+'\n';
}
write('Existing bindings: '+ bindingString);
});
}
// Function that writes to a div with id='message' on the page.functionwrite(message){
document.getElementById('message').innerText+= message;
}
Support details
A capital Y 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.