【发布时间】: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