API Documentation > CorelDRAW > 2025-v26 > TextRange > IVGTextRange
TextRange.IsSame method
Gets whether the current text range is the same as the given range
Syntax:
Function IsSame(ByVal Range As TextRange) As Boolean
Parameters:
Name Type Description
Range
Remarks:
The IsSame method returns whether the current text range is the same as a specified range.
Examples:
The following VBA example displays whether all the words are in the first frame.
Sub Test()
Dim t As Text
Dim s As Shape
Dim d As Document
Set d = CreateDocument
Set s = d.ActiveLayer.CreateParagraphText(2, 2, 4, 4, "This is an example.")
Set t = s.Text
If t.Story.Words.All.IsSame(t.Frames(1).Range) Then
  MsgBox "All of the words are in the first range."
End If 
End Sub