Share via


Comment.Scope Property

Word Developer Reference

Returns a Range object that represents the range of text marked by the specified comment.

Syntax

expression.Scope

expression   An expression that returns a Comment object.

Example

This example displays the text associated with the first comment in the selection.

Visual Basic for Applications
  If Selection.Comments.Count >= 1 Then
    Set myRange = Selection.Comments(1).Scope
    MsgBox myRange.Text
End If

This example copies the text associated with the last comment in the active document.

Visual Basic for Applications
  total = ActiveDocument.Comments.Count
If total >= 1 Then ActiveDocument.Comments(total).Scope.Copy

See Also