The JoinWith method connects two ending nodes by merging them into one. The ConnectWith method connects two ending nodes by drawing a straight line between them.
Examples:
The following VBA example joins the first and last nodes of the active curve by merging them into one.
Sub Connect()
Dim s as Shape
Dim sp as SubPath
Set s = ActiveShape
Set sp = ActiveShape.Curve.Subpaths(1)
With s.Curve.Nodes(1)
.JoinWith sp.Nodes(9)
End With
End Sub