Connector Format Object Example

This example formats all fully connected connectors as curved lines:

Sub FormatConnectors() Dim oShp As Shape Dim oCF As ConnectorFormat 'Loop through all the Shapes in the sheet For Each oShp In ActiveSheet.Shapes 'Is it a Connector? If oShp.Connector Then

'Yes, so get the ConnectorFormat object Set oCF = oShp.ConnectorFormat

'If the connector is connected at both ends, 'make it a curved line. With oCF

If .BeginConnected And .EndConnected Then

.Type = msoConnectorCurve End If End With End If Next End Sub

0 0

Post a comment