Another post on the topic of connectors and gluing and finding closest connection point. This also originated in another post. The attached file demonstrates how a bunch of connectors, not glued to any shape may easily be re-glued. I've also incorporated two additional macros to establish a list of connectivity from previous developments.
Since it is quite possible that neither connector end may be glued, that prevents the use of the connects collection as a means of search. Additionally, the spatialneighbors methods cannot be restricted to just end points. Thus, a connector that may route near an unrelated 2D shape would be "passing thru the neighborhood". But, the method does minimize the potential candidates, which then allows a methodical evaluation of connection point locations to see which may be within the desired spacing of either end of the connector.
The two other macros use either the Shapes.connects or Page.connects collections to generate a report showing connectivity after running the gluing macro. These were kept distinct to allow easier code investigation.
Enjoy.
Wapperdude