Hi again!
Having a bit of a problem here with apparently non-existing shapes being added to a ShapeRange. The general use is more complex, but I have picked out a smaller portion for testing purposes.
To test it out you would create a shape with a, say, shadow effect and some other regular shapes, like rectangles. Then run this:
Code:
Sub PicksWhatItShouldnt()
Dim SR As ShapeRange
Dim S As Shape
Set SR = ActivePage.Shapes.FindShapes()
SR.RemoveRange SR.FindAnyOfType(cdrNoShape, cdrBitmapShape, cdrTextShape, cdrBlendGroupShape, cdrExtrudeGroupShape, _
cdrOLEObjectShape, cdrContourGroupShape, cdrLinearDimensionShape, cdrBevelGroupShape, cdrDropShadowGroupShape, _
cdr3DObjectShape, cdrArtisticMediaGroupShape, cdrConnectorShape, cdrMeshFillShape, cdrCustomShape, _
cdrCustomEffectGroupShape, cdrSymbolShape, cdrHTMLFormObjectShape, cdrHTMLActiveObjectShape, cdrPerfectShape, cdrEPSShape)
For Each S In SR
If S.Outline.Type <> cdrNoOutline And S.Outline.Color.Name <> "None" Then
S.Outline.Color.ConvertToLab
End If
Next S
End Sub
In theory it should just ignore the shadow bits and convert the outline of all the shapes, but in reality we get this:
Any ideas? The main goal here is to do something with the fill and outline of each and every shape that supports such actions.