Class TextFrame (Excel VBA)

The class 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.

Class Shape gives access to class TextFrame.

Member in collection

Characters - Returns a Characters object that represents a range of characters within a shape's text frame. You can use the Characters object to add and format characters within the text frame.

Properties

AutoMargins returns or sets whether Excel automatically calculates text frame margins.

AutoSize true if the size of the specified object is changed automatically to fit text within its boundaries.

HorizontalAlignment returns or sets an XlHAlign value that represents the horizontal alignment for the specified object.

HorizontalOverflow returns or sets the horizontal overflow setting for the specified object.

MarginBottom returns or sets the distance (in points) between the bottom of the text frame and the bottom of the inscribed rectangle of the shape that contains the text.

MarginLeft returns or sets the distance (in points) between the left edge of the text frame and the left edge of the inscribed rectangle of the shape that contains the text.

MarginRight returns or sets the distance (in points) between the right edge of the text frame and the right edge of the inscribed rectangle of the shape that contains the text.

MarginTop returns or sets the distance (in points) between the top of the text frame and the top of the inscribed rectangle of the shape that contains the text.

Orientation returns or sets a Long value that represents the text frame orientation.

ReadingOrder returns or sets the reading order for the specified object. Can be one of the following XlReadingOrder constants: xlRTL (right-to-left), xlLTR (left-to-right), or xlContext.

VerticalAlignment returns or sets an XlVAlign value that represents the vertical alignment of the specified object.

VerticalOverflow returns or sets the vertical overflow setting for the specified object.

Characters - Represents characters in an object that contains text.