返回或设置表明文档文字环绕位置的值。该属性值将决定文档文字是环绕于指定图形的左右两侧,还是其中一侧,或是距页边距最远的一侧。如果文字只环绕于图形的一侧,则图形另一侧与页边距之间将有非文本区。WdWrapSideType,可读写。
WdWrapSideType 可以是下列 WdWrapSideType 常量之一: |
wdWrapBoth |
wdWrapLargest |
wdWrapLeft |
wdWrapRight |
expression.Side
expression 必需。该表达式返回一个 WrapFormat 对象。
本示例在活动文档中添加一个椭圆,并指定文档文字环绕该椭圆外接矩形的左右两侧。本示例将文档文字与该外接矩形四边之间的边距设置为 0.1 英寸。
Set myOval = ActiveDocument.Shapes.AddShape(msoShapeOval, _
0, 0, 200, 50)
With myEll.WrapFormat
.Type = wdWrapSquare
.Side = wdWrapBoth
.DistanceTop = InchesToPoints(0.1)
.DistanceBottom = InchesToPoints(0.1)
.DistanceLeft = InchesToPoints(0.1)
.DistanceRight = InchesToPoints(0.1)
End With