ConnectorFormat 属性

       

返回一个包含连接符格式属性的 ConnectorFormat 对象。应用于代表连接符的 ShapeShapeRange 对象。只读。

示例

本示例向 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