Shape.ConnectorFormat 屬性 (Publisher)
會傳回 ConnectorFormat 物件內含屬性的格式設定的連接器。 適用於代表連接器的 Shape 或 ShapeRange 物件。 唯讀。
語法
運算式。ConnectorFormat
表達 代表 Shape 物件的變數。
範例
在這個範例中,會將兩個矩形新增至使用中出版物的第一頁,並以弧形連接線連接這兩個矩形。
Dim shpRect1 As Shape
Dim shpRect2 As Shape
With ActiveDocument.Pages(1).Shapes
' Add two new rectangles.
Set shpRect1 = .AddShape(Type:=msoShapeRectangle, _
Left:=100, Top:=50, Width:=200, Height:=100)
Set shpRect2 = .AddShape(Type:=msoShapeRectangle, _
Left:=300, Top:=300, Width:=200, Height:=100)
' Add a new curved connector.
With .AddConnector(Type:=msoConnectorCurve, _
BeginX:=0, BeginY:=0, EndX:=100, EndY:=100) _
.ConnectorFormat
' Connect the new connector to the two rectangles.
.BeginConnect ConnectedShape:=shpRect1, ConnectionSite:=1
.EndConnect ConnectedShape:=shpRect2, ConnectionSite:=1
' Reroute the connector to create the shortest path.
.Parent.RerouteConnections
End With
End With
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。