Table of contents
TOC
Collapse the table of content
Expand the table of content

Shape.TextFrame Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns a TextFrame object that represents the text in a shape and the properties that control the margins and orientation of the text.

Syntax

expression. TextFrame

_expression_A variable that represents a Shape object.

Example

The following example adds text to the text frame of shape one in the active publication, and then formats the new text. This example assumes there is at least one shape on the first page of the active publication.

Sub AddTextToTextFrame() 
 With ActiveDocument.Pages(1).Shapes(1).TextFrame.TextRange 
 .Text = "My Text" 
 With .Font 
 .Bold = msoTrue 
 .Size = 25 
 .Name = "Arial" 
 End With 
 End With 
End Sub
© 2018 Microsoft