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

Free Support Forum - aspose.com

Shape names in Powerpoint 2003

Aspose Slides supports names for shapes. Can these names be set in Powerpoint 2003 or only using the API?

You can set slide name and shape name from PowerPoint by running a Macro. For example the below code name all slides and shapes. Then Aspose.Slides properties Slide.Name and Shape.Name will show you the name you set.

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

Here is sample macro code However, I found that only Slide.Name works but Shape.Name does not work, it should also work, we will investigate it.

Sub NameSlidesAndShapes()

'

' Macro created <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />24-Dec-08 by Muhammad Shakeel

'

Dim sld As Slide

Dim shp As Shape

'Set slide name

For j = 1 To ActivePresentation.Slides.Count

Set sld = ActivePresentation.Slides(j)

sld.Name = "SlideNumber" & j

'Set shape name

For k = 1 To sld.Shapes.Count

Set shp = sld.Shapes(k)

shp.Name = "Shape" & j & "-" & k

Next

Next

End Sub