Office.RemoveHandlerOptions interface
Provides options to determine which event handler or handlers are removed.
Remarks
Used by
- Office.Binding: removeHandlerAsync
- Office.CustomXmlPart: removeHandlerAsync
- Office.Document: removeHandlerAsync
- Office.Settings: removeHandlerAsync
Examples
function onBindingDataChanged(eventArgs) {
// Handle binding changes.
}
function removeEventHandlerFromBinding() {
const options: Office.RemoveHandlerOptions = {
handler: onBindingDataChanged
};
Office.select("bindings#MyBinding").removeHandlerAsync(
Office.EventType.BindingDataChanged,
options
);
}
Properties
| async |
A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. |
| handler | The handler to be removed. If a particular handler is not specified, then all handlers for the specified event type are removed. |
Property Details
asyncContext
A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback.
asyncContext?: any
Property Value
any
handler
The handler to be removed. If a particular handler is not specified, then all handlers for the specified event type are removed.
handler?: (eventArgs?: Office.BindingDataChangedEventArgs | Office.BindingSelectionChangedEventArgs) => any
Property Value
(eventArgs?: Office.BindingDataChangedEventArgs | Office.BindingSelectionChangedEventArgs) => any