I have a process where I'm attempting to convert basic SmartArt based shapes from a 3D rectangular shape with rounded corners to a flat, outline only, square corner rectangle.
My current code is able to do everything but change the shape to the square corner shape that is in Autoshapes.
The key lines I have working within a loop are:
ActiveDocument.InlineShapes(I).SmartArt.QuickStyle = Application.SmartArtQuickStyles.Item(1)
ActiveDocument.InlineShapes(I).SmartArt.Color = Application.SmartArtColors.Item(1)
However, I don't see a way to change the shape used by the SmartArt. I can change the shape of the rectangle via the UI. I tried recording a macro, but no luck. Any pointers are welcome.
I've spent hours trying to make this work and never was successful. Theoretically:
Selection.InlineShapes(1).SmartArt.Nodes(1).Shapes.AutoShapeType = msoShape12pointStar
it should be possible using AutoShapeType of the Shape or Shapes object. But I get an "Object does not support this action" error. So it appears Word isn't allowing this change via the object model...
Cindy Meister, VSTO/Word MVP