Creates a promise to return a binding based on the selector string passed in.
Last modified: February 26, 2015
The Office.select method provides access to a Binding object promise that attempts to return the specified binding when any of its asynchronous methods are invoked.
Supported formats: "bindings#bindingId", which returns a Binding object for the binding with the id of bindingId. For more information, see https://msdn.microsoft.com/en-us/library/office/jj220067#AsyncProgramming_PromisesPattern and Binding to regions in a document or spreadsheet.
If the select method promise successfully returns a Binding object, that object exposes only the following four methods of the Binding object: getDataAsync, setDataAsync, addHandlerAsync, and removeHandlerAsync. If the promise cannot return a Binding object, the onError callback can be used to access an asyncResult.error object to get more information.
If you need to call a member of the Binding object other than the four methods exposed by the Binding object promise returned by the select method, instead use the getByIdAsync method by using the Document.bindings property and Bindings.getByIdAsync method to retrieve the Binding object.
The following code example uses the select method to retrieve a binding with the id "cities" from the Bindings collection, and then calls the addHandlerAsync method to add an event handler for the dataChanged event of the binding.