【发布时间】:2016-11-22 03:41:37
【问题描述】:
我正在尝试使用 Word 插件 JavaScript API 添加一个表格,其内容如下图所示
这是我的代码:
$('#addtbl').click(function () {
Word.run(function (context) {
var tables = context.document.getSelection().tables;
tables.load();
return context.sync().then(function () {
tables.first.insertTable(2, 2, Word.InsertLocation.end);
}).then(context.sync);
});
});
它不会将表格添加到我的文档中。如何添加包含内容的表格?
【问题讨论】:
标签: ms-word ms-office office365 add-in office-js