Comment constructor

Comment(doc)

Initializes a new instance of the Comment class.

Comment(doc: Aspose.Words.DocumentBase)
ParameterTypeDescription
docDocumentBaseThe owner document.

Remarks

When Comment is created, it belongs to the specified document, but is not yet part of the document and Node.parentNode is null.

To append Comment to the document use CompositeNode.insertAfter() or CompositeNode.insertBefore() on the paragraph where you want the comment inserted.

After creating a comment, don’t forget to set its Comment.author, Comment.initial and Comment.dateTime properties.

Comment(doc, author, initial, dateTime)

Initializes a new instance of the Comment class.

Comment(doc: Aspose.Words.DocumentBase, author: string, initial: string, dateTime: Date)
ParameterTypeDescription
docDocumentBaseThe owner document.
authorstringThe author name for the comment. Cannot be null.
initialstringThe author initials for the comment. Cannot be null.
dateTimeDateThe date and time for the comment.

See Also