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
..
..
..
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
..
..
..