Share via


ConnectorFormat.BeginDisconnect Method

Detaches the beginning of the specified connector from the shape it is attached to.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Sub BeginDisconnect
'Usage
Dim instance As ConnectorFormat

instance.BeginDisconnect()
void BeginDisconnect()

Remarks

This method doesn't alter the size or position of the connector: the beginning of the connector remains positioned at a connection site but is no longer connected. Use the EndDisconnect() method to detach the end of the connector from a shape.

Examples

This example adds two rectangles to the first slide in the active presentation, attaches them with a connector, automatically reroutes the connector along the shortest path, and then detaches the connector from the rectangles.

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

See Also

Reference

ConnectorFormat Interface

ConnectorFormat Members

Microsoft.Office.Interop.PowerPoint Namespace