MS Word JavaScript API - event handler for Content Controls

Viewed 258

Is there a way to fire a function when clicking on a contentControl in Office-js?

I am writing an add-on for MS Word, and I have inserted content controls, that will be associated with a list in my add-in. I need to fire a function when clicking on the content control, so I can scroll to the item in the list and highlight it.

I have found the "Document.ContentControlOnEnter event (Word)" which seems to be what I am looking for, but I cannot understand how to attach an event-listener that listens to this event.

I am writing the plugin in typescript react.

1 Answers

Word web add-ins don't provide anything for that.

Related