Previous Document Next Document

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


TextRange.Range

Function Range(Start As Long, End As Long) As TextRange

Description

Member of TextRange

The Range method returns a range of characters from a text range.

Parameter
Description
Start
Specifies the first character in the range
End
Specifies the last character in the range

VBA example

The following VBA example applies bold formatting to the fourth to seventh characters in the range.

Sub Test()
 Dim d As Document
 Dim s As Shape
 Dim t As Text
 Set d = CreateDocument
 Set s = d.ActiveLayer.CreateParagraphText(3, 3, 5, 5, _
  "This is an example.")
 Set t = s.Text
 t.Story.Range(4, 7).Bold = True
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.