Word.AnnotationState enum

注釈の状態を表します。

注釈

[ API セット: WordApi 1.7 ]

// 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 (var i = 0; i < annotations.items.length; i++) {
    const annotation = annotations.items[i];

    if (annotation.state === Word.AnnotationState.created) {
      console.log(`Accepting ${annotation.id}`);
      annotation.critiqueAnnotation.accept();

      await context.sync();
      break;
    }
  }
});

フィールド

accepted = "Accepted"

受け入れ られる。

created = "Created"

作成。

rejected = "Rejected"

拒否。