Comments.Add method (Word)

Returns a Comment object that represents a comment added to a range.

Syntax

expression.Add (Range, Text)

expression Required. A variable that represents a 'Comments' collection.

Parameters

Name Required/Optional Data type Description
Range Required Range object The range to have a comment added to it.
Text Optional Variant The text of the comment.

Return value

Comment

Example

This example adds a comment at the insertion point.

Sub AddComment() 
 Selection.Collapse Direction:=wdCollapseEnd 
 ActiveDocument.Comments.Add _ 
 Range:=Selection.Range, Text:="review this" 
End Sub

This example adds a comment to the third paragraph in the active document.

Sub Comment3rd() 
 Dim myRange As Range 
 
 Set myRange = ActiveDocument.Paragraphs(3).Range 
 ActiveDocument.Comments.Add Range:=myRange, _ 
 Text:="original third paragraph" 
End Sub

See also

Comments Collection Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.