Previous Document Next Document
TextFrame.Path

Property Path As Shape

Member of TextFrame

The Path property returns a reference to the text’s path, if the text is fitted to a path.

The Path property returns a read-only value.

The following code example links frames of paragraph text. It then fits text to an ellipse and displays the index number of each frame that is fitted to a shape.

Sub Test() 
 Dim s As Shape 
 Dim s1 As Shape 
 Dim s2 As Shape 
 Dim t As Text 
 Dim f As TextFrame 
 Dim d As Document 
 Set d = CreateDocument 
 Set s = d.ActiveLayer.CreateParagraphText(2, 2, 5, 5, String$(1000, 
"Z")) 
 Set s1 = d.ActiveLayer.CreateParagraphText(5, 5, 8, 8) 
 Set s2 = d.ActiveLayer.CreateEllipse(8, 8, 10, 10) 
 Set t = s.Text 
 ' Link the frames together. 
 t.Frame.LinkTo s1 
 ' Fit the text to the ellipse. 
 s.Text.FitToPath s2 
 ' Go through the frames. 
 For Each f In t.Frames 
  If f.IsFittedToPath = True Then 
   Select Case f.Path.Type 
    Case 2 
     MsgBox "Frame " & f.Index & " is fitted to an ellipse." 
    Case Else 
     MsgBox "Frame " & f.Index & " is fitted to a shape." 
   End Select 
  End If 
 Next f 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.