Word.AnnotationState enum
Stellt den Zustand der Anmerkung dar.
Hinweise
Beispiele
// 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: Word.Paragraph = context.document.getSelection().paragraphs.getFirst();
const annotations: Word.AnnotationCollection = paragraph.getAnnotations();
annotations.load("id,state,critiqueAnnotation");
await context.sync();
for (let i = 0; i < annotations.items.length; i++) {
const annotation: Word.Annotation = annotations.items[i];
if (annotation.state === Word.AnnotationState.created) {
console.log(`Accepting ID ${annotation.id}...`);
annotation.critiqueAnnotation.accept();
await context.sync();
break;
}
}
});
Felder
accepted = "Accepted" | Angenommen. |
created = "Created" | Erstellt. |
rejected = "Rejected" | Zurückgewiesen. |
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.
Office Add-ins