【问题标题】:Is there a way to detect changes to the content control in word in office js?有没有办法检测office js中word内容控件的变化?
【发布时间】:2022-12-02 20:46:39
【问题描述】:

I\'ve got a script that finds all matching bits of text and puts them in a content control. I noticed there was a functionality to remove the content control if the text was edited ContentControl.removeWhenEdited = true. Is there a way to run this same trigger/event of when the text content changes, but instead of removing the content control trigger some custom code instead?

I figured since there\'s already functionality to trigger on the exact event I need, it surely can\'t be too complicated. I tried ContentControl.onDataChanged = MyFunction() but this only ran the function when the content control was added and couldn\'t rerun it when the data was infact changed.

Any and all help greatly appreciated!

    标签: ms-word office-js office-addins word-contentcontrol word-web-addins


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-02-07
    • 1970-01-01
    • 2020-02-23
    • 2017-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多