Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Office.DocumentSelectionChangedEventArgs interface
- Package:
- office
Provides information about the document that raised the SelectionChanged event.
Remarks
Examples
// The following example adds an event handler for the SelectionChanged event of a document.
function addSelectionChangedEventHandler() {
Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, MyHandler);
}
// The SelectionChanged event handler.
function MyHandler(eventArgs: Office.DocumentSelectionChangedEventArgs) {
write('Event raised: ' + eventArgs.type);
doSomethingWithDocument(eventArgs.document);
}
// Function that writes to a div with id='message' on the page.
function write(message) {
document.getElementById('message').innerText += message;
}
Properties
| document | Gets an Office.Document object that represents the document that raised the SelectionChanged event. |
| type | Get an Office.EventType enumeration value that identifies the kind of event that was raised. |
Property Details
document
Gets an Office.Document object that represents the document that raised the SelectionChanged event.
document: Document;
Property Value
type
Get an Office.EventType enumeration value that identifies the kind of event that was raised.
type: EventType;
Property Value
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
Was this page helpful?
