Table of contents
TOC
折叠目录
展开目录

Shape.TextFrame 属性 (发布服务器)Shape.TextFrame Property (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回一个TextFrame对象,该对象代表形状和控件的边距和文本方向的属性中的文本。Returns a TextFrame object that represents the text in a shape and the properties that control the margins and orientation of the text.

语法Syntax

表达式TextFrameexpression. TextFrame

表示形状对象的 _expression_A 变量。_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