I am trying to programatically set the fill colour for SmartArt objects.
Some SmartArt objects work as expected but others have shapes that do not appear to be part of the AllNodes collection of the SmartArt object.
For example, if I insert the second SmartArt object type, called "Alternating Hexagons" I get this by default:
I then use the following code to change the fill colour to an arbitrary grey:
Public Sub FillSmartArt()
Dim oShpNode As Office.Shape
Dim oNode As SmartArtNode
For Each oNode In .SmartArt.AllNodes
For Each oShpNode In oNode.Shapes
oShpNode.Fill.ForeColor.RGB = RGB(128,128,128)
But not all shapes are formatted:
Does the object model support the additional shapes that do not appear to be part of the AllNodes collection?
One side comment, when I use .SmartArt.AllNodes.Count, I get 9 but after further investigation, this SmartArt object is returning two shapes for each child, neither of which is the shape that remains filled with blue.