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

Free Support Forum - aspose.com

How to read the title placeholder from a Powerpoint 97-2003 Presentation (.ppt)?

Hello

How can I read the title of a slide from a Powerpoint 97-2003 Presentation (a .ppt file saved with Powerpoint 2007)?

If I have a .ppt file saved with Powerpoint 2003, the title can be found in the Slide.Placeholders collection at index 0. But this collection is always null if the ppt has been saved with Powerpoint 2007.

Any hints?

Best regards
Thomas

Dear Thomas,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

When you save it with MS-PowerPoint 2007, it converts the placeholders into textframes. So, you will find them in the Slide.Shapes collections.

Please see this thread.

<A href="https://forum.aspose.com/t/103914</A> </P>

Excerpt from this post:

"PowerPoint 2007 converts all placeholders to plain shapes. They don't have links to placeholder records anymore, don't have parent master shapes and etc. So there are no ways to work with these objects as with placeholders in case presentation was saved in PP2007. That is not a problem of Aspose.Slides and I'm afraid we can't do anything to solve it. Information simply doesn't exist and we can't create it from scratch."

This means the title information has been lost.

What a pitty but thank you anyway for your help.

You can guess title by checking its formatting like text size, boldness, number of characters etc.

Also, try to compare if the formatting of textframe matches with a first shape in its master slide. If it matches, then it is a title.

Good idea. Another thing I found out is that if a ppt has been saved from 2007 and the following condition is true…

if (shape.IsTextHolder && shape.TextFrame != null)

...then it seems to be a title too. For othe TextFrames, shape.IsTextHolder seems to be false. This is not working for pptx files.

Best regards
Thomas

There is one more finding, if you create Title/Subtitle placeholders and save in 2003 format in MS-PowerPoint 2007, then they can be located in Slide.Shapes collection. And we can locate them by checking following fields, as you also stated.

1- Shape.IsTextHolder will be true

2- Shape.TextFrame will not be null

3- Shape.Name property contains either Title or Subtitle

Number three works only, if you are using an English version of Powerpoint. I suggest to only check 1 & 2.

Best regards
Thomas