Office add-in - on key pressed - installer -
i develop office add-in microsoft word using html5/javascript api , need following questions:
does word javascript api have event "on key pressed"? time user typing in document able catch event on add-in?
is possible install word add-in directly without using office store? can bundle add-in own installer (for example nsis installer)
thanks shai
there's no api on on-key-pressed event.
the closest option documentselectionchanged api event, fires every time user's selection changes. in word, event fires on key presses, such as:
- any arrow key press
- enter
- tab
- clicking position cursor in document (not key press)
- the first key press of kind (letter, number, etc.) follows 1 of above types of key press.
here's sample:
var doc = office.context.document; doc.addhandlerasync(office.eventtype.documentselectionchanged, function(eventargs){ // when selection changes });
-michael saunders, program manager office add-ins
Comments
Post a Comment