0
我得到每当我试图让款办公应用程序的列表属性以下错误:如何获得列表样式的段落在办公室JS API
{
"name": "OfficeExtension.Error",
"code": "ItemNotFound",
"message": "We couldn’ t find the item you requested. Check the OfficeExtension.Error.debugInfo for more information.",
"traceMessages": [],
"innerError": null,
"debugInfo": {
"code": "ItemNotFound ",
"message": "We couldn’ t find the item you requested.Check the OfficeExtension.Error.debugInfo for more information.",
"errorLocation ": "Paragraph._onAccess "
}
}
这里是我使用的代码:
var paragraphs = context.document.body.paragraphs;
context.load(paragraphs, 'style');
return context.sync().then(function() {
var list = paragraphs.items[0].listOrNullObject;
context.load(list);
return context.sync().then(function() {
var item = list.levelTypes;
return context.sync().then(function() {
console.log("text" + item);
});
})
如何获取段的列表样式?
我运行在只有word.run上下文有关的代码,并能够访问properties.Problem我面临的只有相关的属性访问列表的段落,我得到了上述错误。我在在线办公室365进行测试。 – user1461826