67

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?

6 Answers 6

139

PowerPoint for Windows:

  1. Click on the object (textbox, shape, etc.) to select it.
  2. In the Drawing Tools | Format tab, click on Selection Pane in the Arrange group.
  3. From there, you'll see names of objects.
  4. 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.

Sign up to request clarification or add additional context in comments.

7 Comments

Is this possible to do in PowerPoint Mac 2011?
@posdef I have no idea as I don't use a Macintosh
There is no selection pane in PowerPoint for Mac 2011.
Just an FYI, in PowerPoint 2013, click on the table (or whatever shape you are editing) > Click the Layout tab > The Arrange group and Selection Pane are available on this tab.
If you're here using Apache POI and hoping for an easy way to re-order and get the placeholderId for a Slide Layout, I can confirm that (at least for POI v4.0) this does not work and updates in the Selection pane are not reflected in a way that POI will pick up. (changes to how XSLFSheet.class work will probably be required to support getting placeholder by name)
|
28

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

enter image description here

Comments

5

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.

5 Comments

How can I find what are the ids?
@Dudi is incorrect. The poster wants to SET an identifier. Shape.Id is read-only. msdn.microsoft.com/EN-US/library/office/ff746050.aspx Todd Main's answer is correct. msdn.microsoft.com/EN-US/library/office/ff745119.aspx shows how to set and get Shape.Name
@user1515373 Tod said "Basically so I can reference it in code later". I pointed out that the shape is not something you should rely on as Powerpoint messes with it. even when you set it.
@Dudi: That could be important. Do you know of an action or sequence of actions that would change the name after I set it? Or at least a reference where it says that PP could change the object name on its own after I give it a name.
I'll second @Dudi's warning. It's not so much that names can change, but that it's possible, though it should NOT be, to have multiple shapes with the same name. That can cause the wrong shape to be acted on or PPT to throw wobblies worst case. Tags are more useful and more reliable, though they require a wee bit more code.
4

THIS IS NOT AN ANSWER TO THE ORIGINAL QUESTION, IT'S AN ANSWER TO @Teddy's QUESTION IN @Dudi's ANSWER'S COMMENTS

Here's a way to list id's in the active presentation to the immediate window (Ctrl + G) in VBA editor:

Sub ListAllShapes()

    Dim curSlide As Slide
    Dim curShape As Shape

    For Each curSlide In ActivePresentation.Slides
        Debug.Print curSlide.SlideID
        For Each curShape In curSlide.Shapes

                If curShape.TextFrame.HasText Then
                    Debug.Print curShape.Id
                End If

        Next curShape
    Next curSlide
End Sub

Comments

0

For posterity: This has changed in the newer versions of power-point. Updated directions can be found at this link, relevant excerpt below:

To rename objects by using the Selection Pane

  1. (On Windows) On the Home tab, in the Editing group, click Select > Selection Pane.(On macOS) On the Home tab, in the Arrange group, click Selection Pane.

  2. Click a name in the list to select the object. Click it a second time to make the name editable. The Selection Pane opens on the right side. It shows a list of all the objects on the current slide.

Comments

-1

Click Insert ->Object->Create from file ->Browse.

Once the file is selected choose the "Change icon" option and you will be able to rename the file and change the icon if you wish.

Hope this helps!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.