'How to recolor Shapes/Lines
I have Shapes/Lines I need to recolor.
The problem I encounter is I can't just highlight everything and change line color, or Text Shapes that have no line color will then also now have lines.
How can I either take 2 reference variables for the select color and the recolor, or have the select color based off a currently selected object.
I want to recolor everything from Green to Black.
This is what I hashed together from other guides on the web. It selects objects without lines still (not a lot but some) and won't target anything that's within a group.
Sub Test()
Dim s As Shape
For Each s In ActivePage.Shapes
If s.Cells("LineColor").ResultStr(0) = "RGB(0, 176, 80)" Then
ActiveWindow.Select s, visSelect
End If
Next
End Sub
Solution 1:[1]
ActiveWindow.Select s, visSelect
This line just select shape, not change its color, try use this line
s.Cells("LineColor").FormulaU = "0"
If you need change shapes into group you must use recursive algorithm
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
