Comment Object

Comments
Comment
Range

Represents a single comment. The Comment object is a member of the Comments collection. The Comments collection includes comments in a selection, range or document.

Using the Comment Object

Use Comments(index), where index is the index number, to return a single Comment object. The index number represents the position of the comment in the specified selection, range, or document. The following example displays the author of the first comment in the active document.

MsgBox ActiveDocument.Comments(1).Author

Use the Add method to add a comment at the specified range. The following example adds a comment immediately after the selection.

Selection.Collapse Direction:=wdCollapseEnd
ActiveDocument.Comments.Add Range:=Selection.Range, _
    Text:="review this"

Use the Reference property to return the reference mark associated with the specified comment. Use the Range property to return the text associated with the specified comment. The following example displays the text associated with the first comment in the active document.

MsgBox ActiveDocument.Comments(1).Range.Text

Properties | Application Property | Author Property | Creator Property | Date Property | Index Property | Initial Property | IsInk Property | Parent Property | Range Property | Reference Property | Scope Property | ShowTip Property

Methods | Delete Method | Edit Method

Parent Objects

Child Objects | Range Object