Previous Document Next Document

Object Model Reference : Classes : T : TextRange : Properties : TextRange.Frames


TextRange.Frames

Property Frames As TextFrames

Description

Member of TextRange

The Frames property returns all the text frames in a text range.

The Frames property returns a read-only value.

VBA example

The following VBA example applies bold formatting to the text of the first frame.

Sub Test()
 Dim d As Document
 Dim s As Shape
 Dim s1 As Shape
 Dim s2 As Shape
 Dim t As Text
 Dim strText As String
 strText = "This is a test. This is a test. This is a test. " & _
  "This is a test. This is a test. This is a test. "
 strText = strText & " This is the next part " & strText & strText
 Set d = CreateDocument
 Set s = d.ActiveLayer.CreateParagraphText(2, 2, 4, 4, strText)
 Set s1 = d.ActiveLayer.CreateParagraphText(5, 5, 8, 8)
 Set s2 = d.ActiveLayer.CreateParagraphText(8, 8, 10, 10)
 Set t = s.Text
 ' Link the frames together.
 t.Frame.LinkTo s1
 s1.Text.Frame.LinkTo s2
 ' Bold the first frame.
 t.Frames.First.Range.Bold = True
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.