The following VBA example creates paragraph text and fits the text to the frame.
Sub Test()
Dim d As Document
Dim s As Shape
Dim t As Text
Set d = CreateDocument
Set s = d.ActiveLayer.CreateParagraphText(2, 4, 6, 9, _
"This is a test for the frames.")
Set t = s.Text
t.FitTextToFrame
End Sub