Word.AnnotationState enum
表示批注的状态。
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml
// Accepts the first annotation found in the selected paragraph.
await Word.run(async (context) => {
const paragraph = context.document.getSelection().paragraphs.getFirst();
const annotations = paragraph.getAnnotations();
annotations.load("id,state,critiqueAnnotation");
await context.sync();
for (let i = 0; i < annotations.items.length; i++) {
const annotation = annotations.items[i];
if (annotation.state === Word.AnnotationState.created) {
console.log(`Accepting ID ${annotation.id}...`);
annotation.critiqueAnnotation.accept();
await context.sync();
break;
}
}
});
字段
accepted = "Accepted" | 接受。 |
created = "Created" | 创建。 |
rejected = "Rejected" | 拒绝。 |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈