A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

AutoShape Identification



 
 
Thread Tools Display Modes
  #1  
Old March 5th, 2007, 02:49 PM posted to microsoft.public.powerpoint
BillCPA
external usenet poster
 
Posts: 39
Default AutoShape Identification

Is there anyway to identify, from the autoshapes on a slide, which autoshape
corresponds to the .Shapes(nn). property parameter in VBA code? I'm having
to look at some code and it is difficult to tell which shape is being
referred to back on the slide.

--
Bill @ UAMS
  #2  
Old March 5th, 2007, 03:06 PM posted to microsoft.public.powerpoint
John Wilson
external usenet poster
 
Posts: 6,023
Default AutoShape Identification

Hi Bill

Maybe if the code is there you are stuck with .shapes(nn). It's not a
reliable way to do things because the nn refers to the z order on the slide
and this can change if you move shapes forwards or backwards on the slide.
You can use vba to give shapes fixed names or read their default fixed name
and then use .shapes("name")

If you are stuck the way to deduce the nn number is to add select mutiple
objects to a toolbar and then the list order there will give you the z number
(nn) and also the fixed name. (ie first in the list = shapes(1))
http://www.pptalchemy.co.uk/toolbars1.html

Hope that helps feel free to contact me if you need to.

See
--
Amazing PPT Hints, Tips and Tutorials-http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk


"BillCPA" wrote:

Is there anyway to identify, from the autoshapes on a slide, which autoshape
corresponds to the .Shapes(nn). property parameter in VBA code? I'm having
to look at some code and it is difficult to tell which shape is being
referred to back on the slide.

--
Bill @ UAMS

  #3  
Old March 5th, 2007, 03:22 PM posted to microsoft.public.powerpoint
David M. Marcovitz
external usenet poster
 
Posts: 1,267
Default AutoShape Identification

Are you trying to get the shape's number? You could write a simple macro to
find the number of the selected shape. Another way to do this is by looking
at the number in the Custom Animation. If you are using PowerPoint 2000 or
before, the custom animation dialog box lists the shape number of every
shape on the slide. If you are using 2002 or 2003 (I don't know about 2007,
but I would guess it is the same), custom animation only lists those shapes
that are animated, so you have two choices: (1) animate a shape to find out
its number (and remove the animation once you know), or (2) disable the new
animation features and look at the custom animation dialog box to see all
the shapes on a slide and then turn back on the new animation features.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

=?Utf-8?B?QmlsbENQQQ==?= Bill @ UAMS wrote in
:

Is there anyway to identify, from the autoshapes on a slide, which
autoshape corresponds to the .Shapes(nn). property parameter in VBA
code? I'm having to look at some code and it is difficult to tell
which shape is being referred to back on the slide.


  #4  
Old March 5th, 2007, 08:19 PM posted to microsoft.public.powerpoint
John Wilson
external usenet poster
 
Posts: 6,023
Default AutoShape Identification

I know that we've discussed naming being the best way to go before and it
is!! I've often used the custom show method too to deduce slides(nn) but it
failed on me recently.

Try this - add an org chart and then a rectangle to a text & title slide.
Animate the rectangle and look at its "number". Is it really shapes(12)?
--
Amazing PPT Hints, Tips and Tutorials-http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk


"David M. Marcovitz" wrote:

Are you trying to get the shape's number? You could write a simple macro to
find the number of the selected shape. Another way to do this is by looking
at the number in the Custom Animation. If you are using PowerPoint 2000 or
before, the custom animation dialog box lists the shape number of every
shape on the slide. If you are using 2002 or 2003 (I don't know about 2007,
but I would guess it is the same), custom animation only lists those shapes
that are animated, so you have two choices: (1) animate a shape to find out
its number (and remove the animation once you know), or (2) disable the new
animation features and look at the custom animation dialog box to see all
the shapes on a slide and then turn back on the new animation features.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

=?Utf-8?B?QmlsbENQQQ==?= Bill @ UAMS wrote in
:

Is there anyway to identify, from the autoshapes on a slide, which
autoshape corresponds to the .Shapes(nn). property parameter in VBA
code? I'm having to look at some code and it is difficult to tell
which shape is being referred to back on the slide.



  #5  
Old March 5th, 2007, 08:51 PM posted to microsoft.public.powerpoint
David M. Marcovitz
external usenet poster
 
Posts: 1,267
Default AutoShape Identification

Interesing. The custom animation number seems to count each member of a
group separately and does not match up with the shape number. So, I guess
my advice applies to slides without groups.

I agree that shape names are best. However, the original poster was
working with existing code and trying to match up shape numbers used in
the code to the actual shapes, so names wouldn't help unless he could go
back in time and get the original coder to use names instead of numbers.

Also, this little VBA routine will cycle through each shape on slide 1
and select a shape and give its number.

Sub TellMeNumbers()
Dim i As Long
For i = 1 To ActivePresentation.Slides(1).Shapes.Count
ActivePresentation.Slides(1).Shapes(i).Select
MsgBox i
Next i
End Sub

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

=?Utf-8?B?Sm9obiBXaWxzb24=?= john AT technologytrish.co DOT uk wrote
in :

I know that we've discussed naming being the best way to go before and
it is!! I've often used the custom show method too to deduce
slides(nn) but it failed on me recently.

Try this - add an org chart and then a rectangle to a text & title
slide. Animate the rectangle and look at its "number". Is it really
shapes(12)?


  #6  
Old March 5th, 2007, 10:18 PM posted to microsoft.public.powerpoint
John Wilson
external usenet poster
 
Posts: 6,023
Default AutoShape Identification

Hi David

Sorry not very clear! I meant that the default names were available and
could be substituted using editreplace. Might or might not be a big job.

That diagram thing really through me and I still don't see how the diagram
is 8 shapes! I suppose it's counting the connectors.
--
Amazing PPT Hints, Tips and Tutorials-http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk


"David M. Marcovitz" wrote:

Interesing. The custom animation number seems to count each member of a
group separately and does not match up with the shape number. So, I guess
my advice applies to slides without groups.

I agree that shape names are best. However, the original poster was
working with existing code and trying to match up shape numbers used in
the code to the actual shapes, so names wouldn't help unless he could go
back in time and get the original coder to use names instead of numbers.

Also, this little VBA routine will cycle through each shape on slide 1
and select a shape and give its number.

Sub TellMeNumbers()
Dim i As Long
For i = 1 To ActivePresentation.Slides(1).Shapes.Count
ActivePresentation.Slides(1).Shapes(i).Select
MsgBox i
Next i
End Sub

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/

=?Utf-8?B?Sm9obiBXaWxzb24=?= john AT technologytrish.co DOT uk wrote
in :

I know that we've discussed naming being the best way to go before and
it is!! I've often used the custom show method too to deduce
slides(nn) but it failed on me recently.

Try this - add an org chart and then a rectangle to a text & title
slide. Animate the rectangle and look at its "number". Is it really
shapes(12)?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.