Table of contents

ConnectorFormat.EndConnectionSite 属性 (PowerPoint)ConnectorFormat.EndConnectionSite Property (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

返回用于指定连接符末端所连接的连接结点的整数。只读。Returns an integer that specifies the connection site that the end of a connector is connected to. Read-only.


表达式EndConnectionSiteexpression. EndConnectionSite

表达式_一个表示ConnectorFormat对象的变量。_expression A variable that represents an ConnectorFormat object.

返回值Return Value



如果指定连接符末端没有连接任何形状,该属性会产生错误。If the end of the specified connector isn't attached to a shape, this property generates an error.


本示例假定当前演示文稿的第一张幻灯片已经包含两个形状,且通过连接符“Conn1To2”相连。而示例中的代码会向第一张幻灯片中添加一个矩形框和一个连接符。这个新建的连接符起点将连接到与“Conn1To2”的起点相同的地方。终点则连接到新建的矩形框的第一个连接点上。This example assumes that the first slide in the active presentation already contains two shapes attached by a connector named "Conn1To2." The code adds a rectangle and a connector to the first slide. The end of the new connector will be attached to the same connection site as the end of the connector named "Conn1To2," and the beginning of the new connector will be attached to connection site one on the new rectangle.

Set myDocument = ActivePresentation.Slides(1)

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

    With .Item("Conn1To3").ConnectorFormat
        .BeginConnect r3, 1
        .EndConnect endConnShape1, endConnSite1
    End With
End With

另请参阅See also


ConnectorFormat 对象ConnectorFormat Object

© 2018 Microsoft