Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.17 KB

Visio.Selection.ConnectShapes.md

File metadata and controls

53 lines (33 loc) · 1.17 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Selection.ConnectShapes method (Visio)
vis_sdr.chm11152010
vis_sdr.chm11152010
Visio.Selection.ConnectShapes
40e9c839-69f0-2142-6b9c-249212e373a4
06/08/2017
medium

Selection.ConnectShapes method (Visio)

Connects two or more selected shapes with a dynamic connector. Returns Nothing.

Syntax

expression. ConnectShapes

expression A variable that represents a Selection object.

Return value

Nothing

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the ConnectShapes method to connect two shapes.

Public Sub ConnectShapes_Example() 
 
 Dim vsoShape1 As Visio.Shape 
 Dim vsoShape2 As Visio.Shape 
 
 Set vsoShape1 = Application.ActiveWindow.Page.DrawRectangle(2, 9, 4, 7) 
 Set vsoShape2 = Application.ActiveWindow.Page.DrawRectangle(5, 6, 7, 3) 
 
 ActiveWindow.DeselectAll 
 ActiveWindow.Select vsoShape1, visSelect 
 ActiveWindow.Select vsoShape2, visSelect 
 Application.ActiveWindow.Selection.ConnectShapes 
 
End Sub

[!includeSupport and feedback]