Word 2016加载项:检测文档保存 [英] Word 2016 Add-in: detect document Save

查看:163
本文介绍了Word 2016加载项:检测文档保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Word 2016加载项(Word API + Office.js),我想知道当用户要保存文档时是否有可能得到通知.

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.

文档以LOB格式存储在应用程序的数据库中,在临时路径中提取并在Word中作为普通文件打开.我需要为保存"或另存为"命令创建一个自定义处理程序,以便以编程方式使用文档的新副本来更新数据库.

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.

您认为Word API可以设置保存和其他用户事件的自定义处理程序吗? 谢谢!

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

推荐答案

Office.js当前不支持此事件.同时,我建议公开一个按钮,使用户可以将文档显式地保存在LOB中,无论是在功能区中还是在加载项本身中.

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.

这篇关于Word 2016加载项:检测文档保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆