Class
WordComment
OfficeIMO.Word
A wrapper for Word document comments.
Inheritance
- WordElement
- WordComment
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.
Returned or exposed by 13
- Method WordComment.AddReply
- Method WordComment.Create
- Method WordComment.GetAllComments
- Method WordComment.MarkResolved
- Method WordComment.MarkUnresolved
- Method WordComment.SetResolved
- Property WordComment.ParentComment
- Property WordComment.Replies
- Method WordDocument.AddCellComments
- Property WordDocument.Comments
- Method WordParagraph.AddComment
- Method WordRange.AddComment
- Method WordTable.AddComment
Accepted by parameters 2
- Method WordComment.Create
- Method WordDocument.RemoveComment
Methods
public WordComment AddReply(string author, string initials, string comment) #Creates a reply to this comment.
Parameters
- author string
- Author of the reply.
- initials string
- Initials of the author.
- comment string
- Reply text.
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
- Document to which the comment will be added.
- author string
- Author of the comment.
- initials string
- Initials of the author.
- comment string
- Comment text.
- parent OfficeIMO.Word.WordComment? = null
- Optional parent comment when creating a reply.
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
- Word document containing comments.
public WordComment MarkResolved() #Marks this comment as resolved in the modern comment metadata part.
Returns
WordCommentpublic WordComment MarkUnresolved() #Marks this comment as unresolved in the modern comment metadata part.
Returns
WordCommentpublic 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
- Whether the comment should be marked resolved.
Returns
WordComment