64

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?

Todd Main
  • 28,951
  • 11
  • 82
  • 146
Justin
  • 4,461
  • 22
  • 87
  • 152

5 Answers5

128

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.

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
Todd Main
  • 28,951
  • 11
  • 82
  • 146
  • 2
    Is this possible to do in PowerPoint Mac 2011? – posdef Oct 20 '14 at 12:46
  • @posdef I have no idea as I don't use a Macintosh – Todd Main Oct 23 '14 at 19:26
  • 2
    There is no selection pane in PowerPoint for Mac 2011. – RealCasually Mar 02 '15 at 23:50
  • 3
    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. – dpberry178 Feb 09 '18 at 16:02
  • 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) – Henry C May 13 '19 at 14:49
  • My group names were disabled in my 2016 PowerPoint, but I finally managed to do it using your second set of instructions through the Home tab. To activate group names: Menu "PowerPoint" > Preferences > View > Check "Show group titles". – blue_chip Jul 21 '20 at 18:28
  • In powerpoint 365, it was in: Shape Format | Selection Pane (under send backward) – citynorman Sep 26 '20 at 21:36
  • Someone buy Todd a whiskey, thanks @ToddMain – Dr Manhattan Apr 11 '21 at 16:08
25

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

enter image description here

Bhanu Sinha
  • 1,566
  • 13
  • 10
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.

Dudi
  • 2,340
  • 1
  • 24
  • 39
  • 5
    How can I find what are the ids? – Thea Jul 06 '12 at 09:29
  • @Dudi is incorrect. The poster wants to SET an identifier. Shape.Id is read-only. https://msdn.microsoft.com/EN-US/library/office/ff746050.aspx Todd Main's answer is correct. https://msdn.microsoft.com/EN-US/library/office/ff745119.aspx shows how to set and get Shape.Name – user1515373 May 13 '15 at 14:42
  • @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 May 13 '15 at 19:22
  • @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. – dotNET Apr 08 '17 at 07:46
  • 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. – Steve Rindsberg Mar 27 '22 at 22:35
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
Hauns TM
  • 1,909
  • 2
  • 22
  • 38
0

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!

Sha
  • 1