Contains all comments in the main text or another part of a document. All comments are associated with a certain piece of text of the document. The collection consists of CommentedText objects, describing the position and length of the commented text and the comment string itself. A collection object can be obtained with the TextControl.Comments, the HeaderFooter.Comments or the TextFrame.Comments property. The CommentCollection class implements the IEnumerable and the ICollection interfaces.

Syntax

public sealed class CommentCollection
Public NotInheritable Class CommentCollection

Introduced: 30.0.

Enumerations

Enumeration Description
AddResult Specifies the result when a comment has been added to the document.

Methods

Method Description
Add Adds a new comment to the document.
CopyTo Copies the elements of the collection to an array, starting at a particular index.
GetEnumerator Returns an enumerator that can be used to iterate through the collection.
GetItem Gets a particular item from the collection.
Remove Removes a CommentedText from the collection.

Properties

Property Description
Count Gets the number of elements contained in the collection.
IsSynchronized Returns true if the collection is designed to be thread safe, otherwise, it returns false.
Item Gets the comment with the specified number from the collection.
SyncRoot Gets an object that can be used to synchronize access to the collection.