Reputation: 475
I want to highlight connectors of a Shape object, but it doesn't give me any LineStyle properties for the connector itself. Here's what I got so far:
For i = 0 To UBound(lngShapeIDs)
Dim shp As Shape
Dim connect As connect
Set shp = ActivePage.Shapes.ItemFromID(lngShapeIDs(i))
shp.LineStyle = "Guide"
shp.BringToFront
Set connect = shp.FromConnects.Item(i + 1)
Next
Upvotes: 3
Views: 4950
Reputation: 8629
Based in your comments this is what I think you are looking for
Dim shape As shape
For Each shape In ActivePage.Shapes
If (shape.OneD <> 0) Then
shape.CellsU("LineColor").Formula = "rgb(255,0,0)"
shape.BringToFront
End If
Next
This sample enumerates through all the shapes in the page. It assumes and "1-D" shapes are connectors that need to be modified. For those connectors, their line color is set to red and they are each brought to the front.
So if this was the initial state of the drawing:
Then after running the VBA code, the drawing will look like this:
Upvotes: 3