返回指定形状中的连接部位的数量。只读。Long 类型。
本示例向 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)
lastsite = secondRect.ConnectionSiteCount
With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100) _
.ConnectorFormat
.BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1
.EndConnect ConnectedShape:=secondRect, ConnectionSite:=1
End With
With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100) _
.ConnectorFormat
.BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1
.EndConnect ConnectedShape:=secondRect, _
ConnectionSite:=lastsite
End With