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

Free Support Forum - aspose.com

Finding slide by name

We are trying to make a template pptx. From the template we would like to find a template page. The template will have pages for the Title page, Table of Contents page, Text page, etc. We would like to know the best way to find a page by function rather than its index position. Two methods are hinted at in other posts on this forum.

One way would be to find the slide by its name. SlideEx does have a Name property on which we could search. I can not find a way to enter this slide name in PowerPoint. Is there a way?

The other option appears to be to put a Tag on the slide. I also don't know how to enter Tags in PowerPoint.

Do you have a preferred method for finding a slide? If so, how is it accomplished both on the PowerPoint side and the Aspose side?

We will be using pptx files.

Hi Brad,

I have observed the two methods for slides identification by adding slide tags or adding slide name for uniquely identifying the slide by name and not by position. The SlideEx.Name property is propriety of Aspose.Slides for .NET and can only be set and accessed using Aspose.Slides for .NET API. The slides Tags are other options that can be used and they too can not be added using some options in PowerPoint. Tags can be used by programmers only for uniquely identifying slides or shapes and they can be added using some macros in PowerPoint. Please follow link 1 and link 2 for further information related to tags.

In my humble suggestion, you may use SlideEx.Name property for setting name to each of slide and then saving that template. Afterwards, whenever you ought to find slides by their names, you may use the SlideEX.Name to retrieve the slide name and use that to serve your purpose.

Thanks and Regards,

Thanks Mudassir,

Since neither of the methods can be seen by PowerPoint, I think I will find another way to accomplish this. I think I will just put a text field on each template page, give it an Alt Text name, and put the templates name in the text of the field. That way everyone can see what the templates name is.

When I use a template, I can find it by the text in the template name field. I then can copy the template slide into the target presentation and delete the template name field.

I think that will work and make the process more visible in PowerPoint.

Thanks for your help.

Brad