Comments Property
Applies To
Document object, Range object, Selection object.
Description
Returns a Comments collection that represents all the comments in the specified document, selection, or range. Read-only.
See Also
Add method (Comments collection), ShowBy property.
Example
This example adds a comment to the selected text.
ActiveWindow.View.ShowHiddenText = True
Selection.Comments.Add Range:=Selection.Range, Text:="Approved"
This example compares the author name of each comment in the active document with the user name on the User Information tab in the Options dialog box (Tools menu). If the names aren't the same, the comment reference mark is formatted to appear in red.
For Each comm In ActiveDocument.Comments
If comm.Author <> Application.UserName Then _
comm.Reference.Font.ColorIndex = wdRed
Next comm