We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Text Error Exception


I have a slide where I am browsing through all textboxes, shapes etc with the following code. It more or less except the Autoshape.TextRectange property which produces an exception for the attached slide.

Presentation pres = new Presentation(Application.StartupPath + “\error2.ppt”);

for (int i = 0; i < pres.Slides.Count; i++)
//Accessing a slide using its slide position
Slide slide = pres.Slides[i];
//parsing through shapes
for (int m = 0; m < slide.Shapes.Count; m++)
//autoshape in shapes (has bug)
if (slide.Shapes[m] is Aspose.Slides.AutoShape)
//if you debug the next line, you will see an exception in ash.TextRectangle
AutoShape ash = (AutoShape)slide.Shapes[m];
//Accessing the TextFrame
//TextFrame tf = (TextFrame)slide.Shapes[m].TextFrame;


If I’m not mistaken you created AutoShape but later converted it to WordArt object in PP2007.
Actually that can be done for any type of shape in PowerPoint. After you converted any object
to WordArt, it’s not supported by Aspose.Slides anymore and text can’t be changed.

Hi. I actually don’t know the origin of the PPT. This was one of the slides of the sample PPTs that I received. But if I am correct it is a PPT file not PPTX so not sure how PP2007 feature would be here. Also do you plan to add this feature in future? I am writing a program that needs to access and change all text content within a ppt file. The program would be useless if we cannot access every text objects within a presentation. Also it would make the 6000$ that I spent on purchase of Aspose Total a very bad desicion.

Actually, it’s not a problem that file was created (or changed) by PP2007.
The only problem is WordArt object which is not supported.
WordArt is something very similar to OLE object but has another format.
That is not a part of PPT format specification and Aspose.Slides doesn’t parse it.
Currently we don’t have description of this format and can’t implement it in
the nearest future. Most probably it will be implemented for PPTX format later.