L
Lisa
Essentially, I'm trying to:
· Check all the shapes on a given slide to determine if they meet certain
criteria (shape's name contains a specific string, or shape's tag has a
specific value)
· If a shape meets the criteria, add it to an array
· Use the array to group the shapes or to apply properties (fill, line, etc)
to the shapes in the array
For example, a condensed version of my current code looks something like this:
myArray = Array("Icon_Hat", "Icon_Tree", "Icon_Star")
With myShapes.Range(myArray).Group
.Name = "myTestEffort"
With .Fill
.Solid
.ForeColor.RGB = RGB(255, 153, 51)
End With
.Line.Visible = msoFalse
End With
Instead of defining the array by listing each shape by name, I'd like to be
able to say something like
If myShape.Name Like "Icon_*" Then ... (put it in myArray)
OR
If myShape.Tags("ImgStyle") = "Icon" Then ... (put it in myArray)
Unfortunately, I keep getting stuck at the "put it in myArray" part.
If someone can tell me how to do this -- or refer me to appropriate
documentation, I'd really appreciate it.
Thanks in advance!
· Check all the shapes on a given slide to determine if they meet certain
criteria (shape's name contains a specific string, or shape's tag has a
specific value)
· If a shape meets the criteria, add it to an array
· Use the array to group the shapes or to apply properties (fill, line, etc)
to the shapes in the array
For example, a condensed version of my current code looks something like this:
myArray = Array("Icon_Hat", "Icon_Tree", "Icon_Star")
With myShapes.Range(myArray).Group
.Name = "myTestEffort"
With .Fill
.Solid
.ForeColor.RGB = RGB(255, 153, 51)
End With
.Line.Visible = msoFalse
End With
Instead of defining the array by listing each shape by name, I'd like to be
able to say something like
If myShape.Name Like "Icon_*" Then ... (put it in myArray)
OR
If myShape.Tags("ImgStyle") = "Icon" Then ... (put it in myArray)
Unfortunately, I keep getting stuck at the "put it in myArray" part.
If someone can tell me how to do this -- or refer me to appropriate
documentation, I'd really appreciate it.
Thanks in advance!