Previous Document Next Document

Object Model Reference : Classes : T : TextRange : Methods : TextRange.InRange


TextRange.InRange

Function InRange(Range As TextRange) As Boolean

Description

Member of TextRange

The InRange method returns whether the current text range is within a specified range.

Parameter
Description
Range
Specifies the range

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.