共用方式為


Publisher) (WrapFormat.DistanceLeft 屬性

WrapFormat物件的Type屬性設定為pbWrapTypeSquare時,會傳回或設定Variant,代表檔文字與指定圖案左邊緣之間的 () 距離。 讀取/寫入。

語法

運算式DistanceLeft

表達 代表 WrapFormat 物件的 變數。

範例

本範例會將橢圓形新增至使用中檔,並指定檔文字會繞著環繞橢圓的方形左右兩側。 本範例會設定檔文字與正方形上、下、左側和右側之間的 0.1 英吋邊界。

Sub AddNewShape() 
 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 支援與意見反應