AddConnector Method

         Example         Applies To

Creates a connector. Returns a Shape object that represents the new connector. When a connector is added, it's not connected to anything. Use the BeginConnect and EndConnect methods to attach the beginning and end of a connector to other shapes in the document.

Syntax

expression.AddConnector(Type, BeginX, BeginY, EndX, EndY)

expression   Required. An expression that returns a Shapes object.

Type   Required Long. The type of connector. Can be one of the following MsoConnectorType constants: msoConnectorCurve, msoConnectorElbow, or msoConnectorStraight.

BeginX, BeginY   Required Single. The position (in points) of the connector's starting point relative to the upper-left corner of the document.

EndX, EndY   Required Single. The position (in points) of the connector's end point relative to the upper-left corner of the document.

Remarks

When you attach a connector to a shape, the size and position of the connector are automatically adjusted, if necessary. Therefore, if you’re going to attach a connector to other shapes, the position and dimensions you specify when adding the connector are irrelevant.