Shape.TextWrap 属性 (Publisher)

返回一个 WrapFormat 对象,该对象表示文字环绕形状或形状范围的属性。

语法

表达式TextWrap

表达 一个代表 Shape 对象的变量。

示例

以下示例向活动出版物添加一个椭圆,并指定出版物文本环绕限制椭圆的正方形的左右两侧。 将出版物文字顶部、 底部、 左侧和与图形的方框的右边之间 0.1 英寸的边距。

Sub SetTextWrapFormatProperties() 
 Dim shpOval As Shape 
 
 Set shpOval = ActiveDocument.Pages(1).Shapes.AddShape(Type:=msoShapeOval, _ 
 Left:=36, Top:=36, Width:=100, Height:=35) 
 With shpOval.TextWrap 
 .Type = pbWrapTypeSquare 
 .Side = pbWrapSideBoth 
 .DistanceAuto = msoFalse 
 .DistanceTop = InchesToPoints(0.1) 
 .DistanceBottom = InchesToPoints(0.1) 
 .DistanceLeft = InchesToPoints(0.1) 
 .DistanceRight = InchesToPoints(0.1) 
 End With 
End Sub

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。