I am creating a shape and setting its name. The presentation is saved and closed. But when I reopen the presentation, the shapes I have created have no name set. The code below I have works for .pptx files, but not .ppt files. Is this a bug or are there other ways to set the name for .ppt?
Creating and setting shape name:
IAutoShape ashp = _presentation.Masters.Shapes.AddAutoShape(ShapeType.Rectangle, 0, 0, 1, 1);
ashp.Name = “find me”;
After reopening, I read the shape name as:
for (int i = 0; i < _presentation.Masters.Count; i++)
shapes = _presentation.Masters[i].Shapes;
for (int index = 0; index < shapes.Count; index++)
shape = shapes[index];
Trace("found shape called " + shape.Name);
but none of the shape names are found. All I get is a bunch of "found shape called " without anything after it.
Can anyone please help?