SlideID & Shape ID

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hello,

I am wondering if there is an easy way to maintain a fool-
proof way to programmatically alter shapes and also go to
slides.

For example, on slide #21, I want to change the text
based on which shape the user clicked. I can easily get
the shape number but if some other shapes are added or
changed I can't guarantee that the shape number will
remain the same. Is there a way to name slides and shapes
like you can in say, Access? The way PowerPoint requires
you to use SlideID rather than just a name makes it more
difficult.

Can someone provide a sample line of code to easily use
FindBySlideId? I can't seem to get it functioning
properly. What I ended up doing was using SlideIndex,
which I know is vulnerable.

Thanks ...
 
Hello,

I am wondering if there is an easy way to maintain a fool-
proof way to programmatically alter shapes and also go to
slides.

As you suspect, naming is probably the way to go. Bill's given you one link.
A simple example though:

Sub NameMe()

ActiveWindow.Selection.ShapeRange(1).Name = "Whatever You Like"

End Sub

That'll name the current selected shape to "Whatever You Like"
For example, on slide #21, I want to change the text
based on which shape the user clicked.

That can be far simpler than it'd seem:

Determine which shape was clicked
http://www.rdpslides.com/pptfaq/FAQ00141.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top