Update link in slide

G

Gil

Hello,

I have a slide with some rectangles (used as hyperlinks).
I wrote a sub to update these links.
It worked great, but when I added some slides before this slide I got
an
error (run time error. The item with the specified name was not
found).
I checked and verify that the slide's name remain "Slide 2" (althought
I
added some slides before this slide).

How Can I set s point to the same slide (in case the user adds slides
before) ?

Thank you
Gil



Sub updateHyperlinks()

Dim s As Slide
Set s = ActivePresentation.Slides(2)

With s.Shapes("Rectangle 4")
.ActionSettings(ppMouseClick).Hyperlink.Delete
With .ActionSettings(ppMouseClick).Hyperlink
.Address = ""
.SubAddress = "joe report"
.ScreenTip = ""
.TextToDisplay = ""
End With
End With
..
..
..
 

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

Top