返回一个
TextFrame 对象,该对象包含指定形状的文字。
语法
表达式.TextFrame
表达式 一个代表 Shape
对象的变量。
示例
以下示例在 myDocument 中添加一个矩形,在该矩形中添加文本,并为文本框架设置边距。
示例代码 |
let textframe = ActiveDocument.Shapes.AddShape(msoShapeRectangle, 0, 0, 250, 140).TextFrame
textframe.TextRange.Text = "Here is some test text"
textframe.MarginBottom = 0
textframe.MarginLeft = 100
textframe.MarginRight = 0
textframe.MarginTop = 20
|