Object Model Reference : Classes : T : TextRange : Methods : TextRange.InRange |
Function InRange(Range As TextRange) As Boolean
Member of TextRange
The InRange method returns whether the current text range is within a specified range.
The following VBA example displays whether the second word is 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(2).InRange(t.Frames(1).Range) Then |
MsgBox "The second word is in the first frame." |
Else |
MsgBox "The second word is not in the first frame." |
End If |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.