I feel really stupid. :motz2:
Where can I see the name of a shape/object?
Couldnt find thread on this subject - please help before I have a fit :rofl: !
Printable View
I feel really stupid. :motz2:
Where can I see the name of a shape/object?
Couldnt find thread on this subject - please help before I have a fit :rofl: !
Well, you could type something like this in the immediate window of VBA:
In this case, I am asking for the name of Shape #2 on Slide #1. My result was something archaic like "Rectangle 19". Your result may be something different. My point is, this isn't very helpful. I mean, after all, how do you know the shape your after is the 2nd shape that was added to the slide? In most cases, you don't.Quote:
print ActivePresentation.Slides(1).shapes(2).Name
You can take it a step further by writing a macro to print a list of all the shapes on the current slide. Still not very useful.
Better still, you can download an addin called StarterSet (or StarterSet Plus) from PPTOOLS. This is a collection of very useful tools and one of them is a LAYER MANAGER that does exactly what you want. Is shows you a window of all the names of the shapes on your slide, and you can even step through them to see which ones they are. (see attached pic)
:ipray: Thank you very much for your reply. I still cant grasp that there's no right click - properites .. that'll give me the name of the object.
I'm trying to accomplish a simple multiple choice quiz with a score board. It's driving me nuts :)
Thanhfull for any pointers... :ipray:
Try adding "Select Multiple Objects" to a toolbar
See:
http://www.pptalchemy.co.uk/toolbars1.html
Hah! :)
Thanks for that John. I never knew that was there. I always wondered why it wasn't part of the default buttons. Turns out it is just hidden (typical for Microsoft).
You'll be wondering why the names here and the names in the custom animation pane are different next ;0)
I wasn't, but now that you mention it, WHY is that? :)
I sense you already know the answer.
No I don't. It's just one of microsoft's little mysteries!
A good finding today.Quote:
Originally Posted by John Wilson
I thought there is no way to do that in 2003, so I made an activeX control.
I am late to the game but just in case it is useful here's a piece of code I use to walk through objects on a slide:Quote:
Originally Posted by monokoi
[vba]Sub allShapesSelectName()
Dim oSh As Shape
Dim oShp As Shape
Dim r As Long
Dim lCurrSlide As Long
lCurrSlide = ActiveWindow.Selection.SlideRange.SlideIndex
MsgBox "Slide Name: " & ActivePresentation.Slides(lCurrSlide).Name
For Each oShp In ActivePresentation.Slides(lCurrSlide).Shapes
oShp.Select
r = MsgBox("Shape Name ... " & oShp.Name, vbOKCancel)
If r = 2 Then Exit For
Next oShp
End Sub
[/vba]
I have similar code I use for Object Types and/or Tagged shapes.
For what it's worth, I believe using Tags is and an excellent approach if your are trying to gain a dependable / predictable handle to shapes / objects.