Share via


Word.AnnotationRemovedEventArgs interface

Contient les informations d’annotation qui sont transmises à l’événement d’annotation supprimée.

Remarques

[ Ensemble d’API : WordApi 1.7 ]

Exemples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-annotations.yaml

// Registers event handlers.
await Word.run(async (context) => {
  eventContexts[0] = context.document.onParagraphAdded.add(paragraphChanged);
  eventContexts[1] = context.document.onParagraphChanged.add(paragraphChanged);

  eventContexts[2] = context.document.onAnnotationClicked.add(onClickedHandler);
  eventContexts[3] = context.document.onAnnotationHovered.add(onHoveredHandler);
  eventContexts[4] = context.document.onAnnotationInserted.add(onInsertedHandler);
  eventContexts[5] = context.document.onAnnotationRemoved.add(onRemovedHandler);

  await context.sync();

  console.log("Event handlers registered.");
});

...

async function onRemovedHandler(args: Word.AnnotationRemovedEventArgs) {
  await Word.run(async (context) => {
    for (let id of args.ids) {
      console.log(`AnnotationRemoved: ID ${id}`);
    }
  });
}

Propriétés

ids

Spécifie les ID d’annotation pour lesquels l’événement a été déclenché.

Détails de la propriété

ids

Spécifie les ID d’annotation pour lesquels l’événement a été déclenché.

ids: string[];

Valeur de propriété

string[]

Remarques

[ Ensemble d’API : WordApi 1.7 ]