Word.CommentDetail interface
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
A structure for the ID and reply IDs of this comment.
Remarks
API set: WordApi BETA (PREVIEW ONLY)
Used by
Examples
// 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 });
});
}
Properties
| id | Represents the ID of this comment. |
| reply |
Represents the IDs of the replies to this comment. |
Property Details
id
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Represents the ID of this comment.
id: string;
Property Value
string
Remarks
replyIds
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Represents the IDs of the replies to this comment.
replyIds: string[];
Property Value
string[]