本示例向 myDocument 中添加两个矩形,并且用两个连接符连接这两个矩形。
两个连接符的起始点都连到第一个矩形上的第一个连接部位;连接符的终止点分别连到第二个矩形上的第一个和最后一个连接部位上。

Set myDocument = ActiveDocument
Set s = myDocument.Shapes
Set firstRect = s.AddShape(ksoShapeRectangle, 100, 50, 200, 100)
Set secondRect = s.AddShape(ksoShapeRectangle, 300, 300, 200, 100)
lastsite = secondRect.ConnectionSiteCount
With s.AddConnector(kmsoConnectorCurve, 0, 0, 100, 100).ConnectorFormat
    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1
    .EndConnect ConnectedShape:=secondRect, ConnectionSite:=1
End With
With s.AddConnector(ksoConnectorCurve, 0, 0, 100, 100) _
    .ConnectorFormat
    .BeginConnect ConnectedShape:=firstRect, ConnectionSite:=1
    .EndConnect ConnectedShape:=secondRect, _
    ConnectionSite:=lastsite
End With