返回或设置文本框架左边与文本所在的图形的内接矩形左边的距离(以磅为单位)。Single 类型,可读写。
expression.MarginLeft
expression 必需。该表达式返回一个 TextFrame 对象。
本示例将一个矩形添至 myDocument
,并在矩形中添加文字,然后设置文本框架的边距。
Set myDocument = ActiveDocument
With myDocument.Shapes.AddShape(msoShapeRectangle, _
0, 0, 250, 140).TextFrame
.TextRange.Text = "Here is some test text"
.MarginBottom = 0
.MarginLeft = 100
.MarginRight = 0
.MarginTop = 20
End With