Previous Document Next Document
TextRange.IsSame

Function IsSame(Range As TextRange) As Boolean

Member of TextRange

The IsSame method returns whether the current text range is the same as the specified range.

Parameters
Description
Range
Specifies the range to compare

The following code example displays whether all of 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.