Word.CommentEventArgs interface

注意

この API は開発者向けにプレビューとして提供されており、寄せられたフィードバックにもとづいて変更される場合があります。 この API は運用環境で使用しないでください。

コメント イベントを発生させたコメントに関する情報を提供します。

注釈

API セット: WordApi ベータ版 (プレビューのみ)

使用元

例

// 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 });
    });
}

プロパティ

changeType

commentChanged イベントが発生する方法を表します。

commentDetails

関連するコメントの ID と応答 ID を含む CommentDetail 配列を取得します。

source

イベントのソースを指定します。 ローカルまたはリモート (共同編集による) にすることができます。

type

イベントの種類を指定します。 詳細は「Word.EventType」をご覧ください。

プロパティの詳細

changeType

注意

この API は開発者向けにプレビューとして提供されており、寄せられたフィードバックにもとづいて変更される場合があります。 この API は運用環境で使用しないでください。

commentChanged イベントが発生する方法を表します。

changeType: Word.CommentChangeType | "none" | "edited" | "resolved" | "reopened" | "replyAdded" | "replyDeleted" | "replyEdited";

プロパティ値

Word.CommentChangeType | "none" | "edited" | "resolved" | "reopened" | "replyAdded" | "replyDeleted" | "replyEdited"

注釈

API セット: WordApi ベータ版 (プレビューのみ)

commentDetails

注意

この API は開発者向けにプレビューとして提供されており、寄せられたフィードバックにもとづいて変更される場合があります。 この API は運用環境で使用しないでください。

関連するコメントの ID と応答 ID を含む CommentDetail 配列を取得します。

commentDetails: Word.CommentDetail[];

プロパティ値

注釈

API セット: WordApi ベータ版 (プレビューのみ)

source

注意

この API は開発者向けにプレビューとして提供されており、寄せられたフィードバックにもとづいて変更される場合があります。 この API は運用環境で使用しないでください。

イベントのソースを指定します。 ローカルまたはリモート (共同編集による) にすることができます。

source: Word.EventSource | "Local" | "Remote";

プロパティ値

Word.EventSource | "Local" | "Remote"

注釈

API セット: WordApi ベータ版 (プレビューのみ)

type

注意

この API は開発者向けにプレビューとして提供されており、寄せられたフィードバックにもとづいて変更される場合があります。 この API は運用環境で使用しないでください。

イベントの種類を指定します。 詳細は「Word.EventType」をご覧ください。

type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction";

プロパティ値

Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted" | "CommentDeleted" | "CommentSelected" | "CommentDeselected" | "CommentChanged" | "CommentAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"

注釈

API セット: WordApi ベータ版 (プレビューのみ)