Shapes.AddConnector Method
PowerPoint Developer Reference |
Creates a connector. Returns a Shape object that represents the new connector. When a connector is added, it is 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 A variable that represents a Shapes object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Type | Required | MsoConnectorType | The type of connector. |
BeginX | Required | Single | The horizontal position, measured in points, of the connector's starting point relative to the left edge of the slide. |
BeginY | Required | Single | The vertical position, measured in points, of the connector's starting point relative to the top edge of the slide. |
EndX | Required | Single | The horizontal position, measured in points, of the connector's ending point relative to the left edge of the slide. |
EndY | Required | Single | The vertical position, measured in points, of the connector's ending point relative to the top edge of the slide. |
Return Value
Shape
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.
Example
This example adds two rectangles to myDocument and connects them with a curved connector. Note that when you attach the connector to the rectangles, the size and position of the connector are automatically adjusted; therefore, the position and dimensions you specify when adding the callout are irrelevant (dimensions must be nonzero).
Visual Basic for Applications |
---|
|
See Also