How to name an object within a PowerPoint slide? How to name an object within a PowerPoint slide? vba vba

How to name an object within a PowerPoint slide?


Yes. Click on the object (textbox, shape, etc.) to select the object and in the Drawing Tools | Format tab, click on Selection Pane in the Arrange group. From there, you'll see names of objects - you can double click (or press F2) on any name and rename it. By deselecting it, it becomes renamed. You can also get to this from the Home tab -> Drawing group -> Arrange drop-down -> Selection pane or by pressing ALT + F10.


Select the Object -> Format -> Selection Pane -> Double click to change the name

enter image description here


While the answer above is correct I would not recommend you to change the name in order to rely on it in the code.

Names are tricky. They can change.You should use the ShapeId and SlideId.

Especially beware to change the name of a shape programmatically since PowerPoint relies on the name and it might hinder its regular operation.