Share via


PowerPoint) (ShapeRange.ConnectorFormat 屬性

會傳回 ConnectorFormat 物件內含屬性的格式設定的連接器。 適用於代表連接器的 ShapeShapeRange 物件。 唯讀。

語法

運算式ConnectorFormat

表達 代表 ShapeRange 物件的 變數。

傳回值

ConnectorFormat

範例

這個範例會在 myDocument 中新增兩個矩形,再用連接線將這兩個矩形連接起來,並且自動將連接線調整到最短路徑,然後再中斷連接線與矩形的連接。

Set myDocument = ActivePresentation.Slides(1)

Set s = myDocument.Shapes

Set firstRect = s.AddShape(msoShapeRectangle, 100, 50, 200, 100)

Set secondRect = s.AddShape(msoShapeRectangle, 300, 300, 200, 100)

With s.AddConnector(msoConnectorCurve, 0, 0, 0, 0).ConnectorFormat

    .BeginConnect firstRect, 1

    .EndConnect secondRect, 1

    .Parent.RerouteConnections

    .BeginDisconnect

    .EndDisconnect

End With

另請參閱

ShapeRange 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應