【发布时间】:2017-02-13 11:19:38
【问题描述】:
我看到了关于custom properties 的MS Office js api 1.3 文档。 但是我无法从 office js 的 word 设置中读取任何自定义属性项。
`Word.run(function (context) {
// Create a proxy object for the document.
var thisDocument = context.document;
var customProperties = thisDocument.properties.customProperties;
context.load(customProperties);
return context.sync().then(function () {
var getcount = customProperties.getCount();
console.log(customProperties.items);
return context.sync().then(function () {
console.log(getcount.value);
});
});
})`
customProperties.items 总是返回空数组。我在customProperties 中也找不到set 方法
我的自定义属性显示在此 (https://i.stack.imgur.com/AywDo.png)。
MS Office js api还不支持访问word中的自定义属性吗?
【问题讨论】:
标签: javascript office-js office-addins