Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Comments Object (Word)

A collection of Comment objects that represent the comments in a selection, range, or document.

Use the Comments property to return the Comments collection. The following example displays comments made by Don Funk in the active document.

ActiveDocument.ActiveWindow.View.SplitSpecial = wdPaneComments 
ActiveDocument.Comments.ShowBy = "Don Funk"

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 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

The following example displays the initials of the author of the first comment in the selection.

If Selection.Comments.Count >= 1 Then MsgBox _ 
© 2015 Microsoft