views:

47

answers:

2

So I know how to name a textbox, or a like object in PowerPoint with VB, but I was wondering if there was a way to name objects through the Ribbon (PowerPoint 2007). For instance, if I add a text box onto a slide, is there a way to assign it a name (sort of like the properties window in access, or the textbox in Excel 2003 at the top left side where you can enter the name)?

Basically so I can reference it in code later; without having to use code to name each and every object i add after the fact. Perhaps an easier way through the Ribbon?

+2  A: 

Yes. Just double-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 just 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, if you want a crazy keyboard shortcut to launch the Selection Pane, type ALT, H, S, L, and then P).

Otaku
great! thanks. I new there was probably a faster interface way to do this simple little task. appreciate it!
Justin
+1  A: 

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.