有没有办法使用 office-js 将 Word 内容控件绑定到自定义 XML 部件? [英] Is there a way to bind Word content controls to a custom XML Part using office-js?

查看:59
本文介绍了有没有办法使用 office-js 将 Word 内容控件绑定到自定义 XML 部件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Office.js/Word.js 功能很陌生.

I'm pretty new to the Office.js/Word.js features.

尝试确定是否可以使用 Office (JavaScript) 加载项的当前功能集将 Word 内容控件绑定到自定义 XML 部件.如果没有,有人知道是否已请求此功能?它可以在 VBA 和 VSTO 对象模型中通过使用 XPATH 分配 XML 映射来完成.

Trying to determine if there is there a way to bind Word content controls to a custom XML Part using the current feature sets for Office (JavaScript) Add-Ins. If not, anyone know if this feature has been requested? It can be done in the VBA and VSTO object models using by assigning an XML Mapping using XPATH.

谢谢,艾伦

推荐答案

没有直接执行此操作的 API,但是您可以使用 OOXML 插入来实现.确保获取具有 XML 映射的 OOXML,并使用 range.insertOOXML(ooxml, "replace") 选项插入 OOXML.(contentcontrol.insertOoxml(ooxml, "replace") 也可以工作.

there is no API to directly do this, however you can achieve it using OOXML insertion. Make sure to get the OOXML that has an XML mapping and the insert the OOXML using range.insertOOXML(ooxml, "replace") option. (contentcontrol.insertOoxml(ooxml, "replace") will also work.

这篇关于有没有办法使用 office-js 将 Word 内容控件绑定到自定义 XML 部件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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