TextFrame Object [Excel 2003 VBA Language Reference]

Multiple objects
TextFrame

Represents the text frame in a Shape object. Contains the text in the text frame as well as the properties and methods that control the alignment and anchoring of the text frame.

Using the TextFrame Object

Use the TextFrame property to return a TextFrame object. The following example adds a rectangle to myDocument, adds text to the rectangle, and then sets the margins for the text frame.

Set myDocument = Worksheets(1)
With myDocument.Shapes.AddShape(msoShapeRectangle, _
        0, 0, 250, 140).TextFrame
    .Characters.Text = "Here is some test text"
    .MarginBottom = 10
    .MarginLeft = 10
    .MarginRight = 10
    .MarginTop = 10
End With

Properties | Application Property | AutoMargins Property | AutoSize Property | Creator Property | HorizontalAlignment Property | MarginBottom Property | MarginLeft Property | MarginRight Property | MarginTop Property | Orientation Property | Parent Property | ReadingOrder Property | VerticalAlignment Property

Methods | Characters Method

Parent Objects | Shape Object | ShapeRange Collection

Child Objects