Office.js Word Document content changes

Office.js Word Document content changes
9

Upvotes

Upvote

 Nov 22 2021
5 Comments (5 New)
New

Could we have an event to subscribe for document changes for Word. There is a possible work around is to use Bindings for the content control and add a data changed event to the binding (this will work across all platforms). I'd be greate to have an easy way to do so.


Expected behavior:

Office.context.document.addHandlerAsync(Office.EventType.DocumentChanged, ...);

Comments
Microsoft

Member of the product team here, we are looking into this area.

If interested in this space, please go ahead and fill in this survey to help us understand and prioritize requirements: https://aka.ms/WordAPI 

Brass Contributor

@lindalu-MSFT 
This would be a great extension

Copper Contributor

I literally have no idea why this is not provided from the very start. I mean it's obivious... As a developer you want to listen on changes to react upon. Same thing with keybindings to enhance the user experience.

Microsoft

We have introduced paragraph event and please see if this can solve your problem: Word JavaScript preview APIs - Office Add-ins | Microsoft Learn

Microsoft

Word JavaScript API requirement set 1.7 - Office Add-ins | Microsoft Learn now is available that you could catch paragraph event.