Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordComment

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Source revision
0eef6a5756b9 with working tree changes

A wrapper for Word document comments.

Inheritance

Usage

Explore 15 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 2

Methods

public WordComment AddReply(string author, string initials, string comment) #

Creates a reply to this comment.

Parameters

author string required
Author of the reply.
initials string required
Initials of the author.
comment string required
Reply text.

Returns

WordComment Newly created reply comment.
public static WordComment Create(WordDocument document, string author, string initials, string comment, WordComment? parent = null) #

Creates a new comment in the specified document.

Parameters

document OfficeIMO.Word.WordDocument required
Document to which the comment will be added.
author string required
Author of the comment.
initials string required
Initials of the author.
comment string required
Comment text.
parent OfficeIMO.Word.WordComment? = null optional
Optional parent comment when creating a reply.

Returns

WordComment The newly created WordComment.
public void DeleteThread() #

Deletes this comment and all replies in its thread.

public static List<WordComment> GetAllComments(WordDocument document) #

Retrieves all comments from the provided document.

Parameters

document OfficeIMO.Word.WordDocument required
Word document containing comments.

Returns

List<WordComment> List of WordComment objects.
public WordComment MarkResolved() #

Marks this comment as resolved in the modern comment metadata part.

public WordComment MarkUnresolved() #

Marks this comment as unresolved in the modern comment metadata part.

public void Remove() #

Deletes this comment and removes all references from the document.

public WordComment SetResolved(bool resolved) #

Sets the resolved state for this comment in the modern comment metadata part.

Parameters

resolved bool required
Whether the comment should be marked resolved.

Properties

public string? Id { get; } #

ID of a comment

public string? ParaId { get; } #

Identifier used to link threaded replies.

public string? ParentParaId { get; } #

Identifier of parent comment if this comment is a reply.

public bool? IsResolved { get; } #

Whether the comment is marked resolved. A null value means the document has no resolved-state metadata for this comment.

public WordComment? ParentComment { get; } #

Parent comment instance if available.

public List<WordComment> Replies { get; } #

Replies for this comment.

public string? Text { get; set; } #

Text content of a comment

public string? Initials { get; set; } #

Initials of a person who created a comment

public string? Author { get; set; } #

Full name of a person who created a comment

public DateTime? DateTime { get; set; } #

DateTime when the comment was created