5

I'm developing a Word 2016 Add-in (Word API + Office.js) and I'm wondering if it's possible to get notified when the user is about to save the document.

The document is stored as a LOB on application's database, extracted on a temporary path and opened as a normal file in Word. I need to create a custom handler for Save or Save As command, in order to programmatically update the database with a fresh copy of the document.

Do you think that Word API has a way to set custom handlers on Save and other user events? Thanks!

jeanie77
  • 515
  • 1
  • 4
  • 22

1 Answers1

4

this event is currently not supported in Office.js. I recommend in the meantime to expose a button to make the user explicitly save the document on the LOB, either in the ribbon or in the add-in itself.

Juan Balmori
  • 4,898
  • 1
  • 8
  • 17
  • 1
    Thanks Juan, I agree with you that the custom save button is the only available solution, at least for now. Are you planning to work on such events, in the near future? – jeanie77 Feb 13 '17 at 09:38
  • yes we have talked about it and most probably we will in the future. – Juan Balmori Feb 17 '17 at 20:31
  • I also need this type of functionality, and have raised this as well as another use case for consideration [here](https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/18400303-emit-event-for-document-that-is-about-to-be-saved) – AndrewO Feb 20 '17 at 23:15
  • 1
    in a more detailed analysis, I do not think they'll ever implement it, since in the online version of 365 saving is automatic and not chosen by the user... – jeanie77 Feb 21 '17 at 10:02
  • There's a vote for this feature in the Office Developer Platform's UserVoice page: https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/18400303-emit-event-for-document-that-is-about-to-be-saved – Mobiletainment Sep 12 '17 at 14:15
  • Any change to this lately, Juan? – seebiscuit Jan 25 '18 at 21:01
  • @JuanBalmori I don't wanna be pushy, but have there been any changes to the status quo? – Mafii Feb 28 '20 at 16:26
  • Hello all, unfortunately there is no relevant update for this case at this point. – Juan Balmori Mar 10 '20 at 16:48