A CommentedText object represents a commented piece of text. A comment can be inserted with a built-in comment input control which can be opened through the context menu when a piece of text has been selected. Additionally, a comment can be inserted trough the CommentCollection.Add methods. All CommentedText objects are contained in the CommentCollection which can be obtained with the Comments property.

Syntax

public class CommentedText
Public Class CommentedText

Introduced: 30.0.

Constructors

Constructor Description
CommentedText Initializes a new instance of the CommentedText class.

Methods

Method Description
EditComment Opens a comment input control to edit the comment's text.
ReplyToComment Opens a comment input control to reply to this comment.
Save Saves the commented text with the specified format.
ScrollTo Sets the current input position to the first position of the commented text and scrolls it into the visible part of the document.
Select Selects the commented part of the document.

Properties

Property Description
Active Gets or sets a value specifying whether the comment is currently active or not.
Comment Gets or sets a string which is the comment.
CreationTime Gets the date and time when the comment has been inserted.
DefaultHighlightColor Gets the default highlight color for the commented text.
HighlightColor Gets or sets the highlight color for the commented text.
HighlightMode Gets or sets a value indicating whether the commented text is highlighted.
ID Gets or sets a user-defined identifier.
Length Gets the number of commented characters.
Number Gets the comment's number.
RepliedComment Gets the comment for which this comment is a reply.
Replies Gets all replies of this comment or null if there are no replies.
Start Gets the index (one-based) of the first commented character.
Text Gets the commented text.
UserName Gets the name of the user who has commented the document.