Word.EventSource enum

Uma enumeração que especifica a origem de um evento. Pode ser local ou remoto (por meio de coautoria).

Comentários

Conjunto de APIs: WordApi 1.5

Usada por

Exemplos

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/comment-events.yaml

async function onEventHandler(event: Word.CommentEventArgs) {
    // Report the event source and the IDs of affected comments and replies.
    const remoteSource: Word.EventSource = Word.EventSource.remote;
    console.log(`${event.type} event. Source: ${event.source}.`);
    if (event.source === remoteSource) {
        console.log("A coauthor triggered this event.");
    }
    event.commentDetails.forEach((comment: Word.CommentDetail) => {
        console.log("Affected comment:", { id: comment.id, replyIds: comment.replyIds });
    });
}

Campos

local = "Local"

Origem local.

remote = "Remote"

Fonte remota.