Free Support Forum - aspose.com

Unable to read text from this ppt.. with tables

Please see the attached ppt file.

When I tried to read the text from all the Shapes, Aspose Presentation object returns the right count (10), for number of shapes. But these shape objects have no textholder or text in it. The width and height of the shape objects seem right. But text is missing.

I am able to read the entire slide text using Microsoft interop though.

Please let me know if you have a solution., or a workaround to read text from this ppt.

Thanks,
Anita

Hi Anita,

Thanks for considering Aspose.Slides.

Actually, you have used group shapes in your slides and the group shape is collection of many shapes. So, you need to access the individual shape inside the group shape for accessing the text. Please use the code snippet below, as this will help you in reading the slide contents.

Presentation pres = new Presentation("D://ppt//Briefmarken.ppt");<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Slide sl = pres.Slides[0];

Shapes sh = sl.Shapes;

foreach (Shape shp in sh)

{

if (shp is GroupShape)

{

GroupShape gshp = shp as GroupShape;

foreach(Shape s in gshp.Shapes)

{

if(s.TextFrame!=null)

MessageBox.Show(s.TextFrame.Text);

}

}

}

Thanks and Regards,