An abstract class that represents a binding to a section of the document.
|Hosts:||Access, Excel, Word|
|Available in Requirement sets||MatrixBinding, TableBinding, TextBinding|
|Last changed in TableBinding||1.1|
|MatrixBinding||Represents a binding in two dimensions of rows and columns.|
|TableBinding||Represents a binding in two dimensions of rows and columns, optionally with headers.|
|TextBinding||Represents a bound text selection in the document.|
|document||Get the Document object associated with the binding.|
|id||Gets the identifier of the object.|
|type||Gets the type of the binding.|
|addHandlerAsync||Adds a handler to the binding for the specified event type.|
|getDataAsync||Returns the data contained within the binding.|
|removeHandlerAsync||Removes the specified handler from the binding for the specified event type.|
|setDataAsync||Writes data to the bound section of the document represented by the specified binding object.|
|TableBinding.setFormatsAsync||Sets or updates formatting on specified items and data in the bound table.|
|bindingDataChanged||Occurs when data within the binding is changed.|
|bindingSelectionChanged||Occurs when the selection is changed within the binding.|
The Binding object exposes the functionality possessed by all bindings regardless of type.
The Binding object is never called directly. It is the abstract parent class of the objects that represent each type of binding: MatrixBinding, TableBinding, or TextBinding. All three of these objects inherit the getDataAsync and setDataAsync methods from the Binding object that enable to you interact with the data in the binding. They also inherit the id and type properties for querying those property values. Additionally, the MatrixBinding and TableBinding objects expose additional methods for matrix- and table-specific features, such as counting the number of rows and columns.
Support for each API member of the Binding object differs across Office host applications. See the "Support details" section of each member's topic for host support information.
For more information about Office host application and server requirements, see Requirements for running Office Add-ins.
|Available in requirement sets||MatrixBinding, TableBinding, TextBinding|
|Add-in types||Content, task pane|