EndConnected Property

Microsoft Publisher Visual Basic

constant indicating whether the end of the specified connector is connected to a shape. Read-only.

MsoTriState can be one of these MsoTriState constants.
msoCTrue Not used with this property.
msoFalse The end of the specified connector is not connected to a shape.
msoTriStateMixed Return value only; indicates a combination of msoTrue and msoFalse in the specified shape range.
msoTriStateToggle Not used with this property.
msoTrue The end of the specified connector is connected to a shape.

expression.EndConnected

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

Use the BeginConnected property to determine if the beginning of a connector is connected to a shape.

Example

If the third shape on the first page in the active publication is a connector whose end is connected to a shape, this example stores the connection site number, stores a reference to the connected shape, and then disconnects the end of the connector from the shape.

Dim intSite As Integer
Dim shpConnected As Shape

With ActiveDocument.Pages(1).Shapes(3)

    ' Test whether shape is a connector.
    If .Connector Then
        With .ConnectorFormat

            ' Test whether connector is connected to another shape.
            If .End Connected Then

                ' Store connection site number.
                intSite = .EndConnectionSite

                ' Set reference to connected shape.
                Set shpConnected = .EndConnectedShape

                ' Disconnect connector and shape.
                .EndDisconnect
            End If
        End With
    End If
End With