public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Shapes();
// Instantiate Presentation class that represents PPTX file
Presentation pres = new Presentation(dataDir + "AltText.pptx");
// Get the first slide
ISlide sld = pres.Slides[0];
for (int i = 0; i < sld.Shapes.Count; i++)
{
// Accessing the shape collection of slides
IShape shape = sld.Shapes[i];
if (shape is GroupShape)
{
// Accessing the group shape.
IGroupShape grphShape = (IGroupShape)shape;
for (int j = 0; j < grphShape.Shapes.Count; j++)
{
IShape shape2 = grphShape.Shapes[j];
// Accessing the AltText property
Console.WriteLine(shape2.AlternativeText);
}
}
}
}
}