共用方式為


Excel) (ConnectorFormat.EndConnectionSite 屬性

會傳回整數,指定接點的終點所連接到的連接位置。 唯讀的 Long

語法

運算式EndConnectionSite

表達 代表 ConnectorFormat 物件的 變數。

註解

如果所指定接點的終點並未附加至圖案,此屬性就會產生錯誤。

範例

本範例假設 myDocument 已經包含名為 Conn1To2 的連接器所連接的兩個圖形。 本範例的程式碼將向 myDocument 新增一個矩形和一條連接線。 新連接器的結尾會附加至與名為 Conn1To2 之連接器結尾相同的連線月臺,而新連接器的開頭會附加至新矩形上的第一個連線月臺。

Set myDocument = Worksheets(1) 
With myDocument.Shapes 
 Set r3 = .AddShape(msoShapeRectangle, _ 
 100, 420, 200, 100) 
 With .Item("Conn1To2").ConnectorFormat 
 endConnSite1 = .EndConnectionSite 
 Set endConnShape1 = .EndConnectedShape 
 End With 
 With .AddConnector(msoConnectorCurve, _ 
 0, 0, 10, 10).ConnectorFormat 
 .BeginConnect r3, 1 
 .EndConnect endConnShape1, endConnSite1 
 End With 
End With

支援和意見反應

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