API Reference
Class
WordComment
A wrapper for Word document comments.
Inheritance
- WordElement
- WordComment
Methods
public WordComment AddReply(String author, String initials, String comment) #Returns:
WordCommentCreates a reply to this comment.
Parameters
- author System.String
- Author of the reply.
- initials System.String
- Initials of the author.
- comment System.String
- Reply text.
Returns
Newly created reply comment.
public static WordComment Create(WordDocument document, String author, String initials, String comment, WordComment parent = null) #Returns:
WordCommentCreates a new comment in the specified document.
Parameters
- document OfficeIMO.Word.WordDocument
- Document to which the comment will be added.
- author System.String
- Author of the comment.
- initials System.String
- Initials of the author.
- comment System.String
- Comment text.
- parent OfficeIMO.Word.WordComment = null
- Optional parent comment when creating a reply.
Returns
The newly created WordComment.
public Void Delete() #Returns:
VoidDeletes this comment and removes all references from the document.
public static List<WordComment> GetAllComments(WordDocument document) #Returns:
List<WordComment>Retrieves all comments from the provided document.
Parameters
- document OfficeIMO.Word.WordDocument
- Word document containing comments.
Returns
List of WordComment objects.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
Properties
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 WordComment ParentComment { get; } #Parent comment instance if available.
public List<WordComment> Replies { get; } #Replies for this 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 Nullable<DateTime> DateTime { get; set; } #DateTime when the comment was created