PDA

View Full Version : How can you name a slide and then refer to it by name in a hyperlink?



fkneg1
10-18-2013, 04:07 AM
Hi,
I want to set up a hyperlink to another slide in the same presentation. The problem is that the slide I want to refer to is in a different position each time a new presentation is set up. I think I have named the slide using the following:

.Slides.Add(rs.AbsolutePosition + 1, ppLayoutBlank)
.Name = "StartSlide"
But when I try and refer to the slide by its name in the hyperlink (as below) the link is not created so it doesn't work.

With .ActionSettings(ppMouseClick)
.Hyperlink.SubAddress = "StartSlide"
End With
Is there another way that this should be done?
Thanks in advance.

John Wilson
10-18-2013, 07:28 AM
The Hyperlink.SubAddress is a string like this:

"SlideID,SlideIndex,SlideTitle" You cannot use the Slide Name.

Example would be "257,2,My Slide"

fkneg1
10-18-2013, 12:21 PM
Example would be "257,2,My Slide"
Wouldn't the SlideID and SlideIndex change each time depending on the position of the slide? Is there anyway to refer to the slide even if it changes position in different presentations? Maybe using tags?

John Wilson
10-18-2013, 11:02 PM
The SlideiD should never change.

If the SlideIndex changes the iD takes preference and so the link will work even if the slide is moved to a new position.
You probably do not need to specify the title.

So, to create a link to the CURRENT slide 2

With oshp.ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.SubAddress = CStr(ActivePresentation.Slides(2).SlideID) & ",2,Title"
End With

OR more generic

With oshp.ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.SubAddress = CStr(ActivePresentation.Slides(2).SlideID) _
& "," & CStr(ActivePresentation.Slides(rs_AbsolutePosition + 1).SlideIndex) & ",Title "
End With

Leta56
10-21-2013, 12:10 AM
Thanks to provide good information and i am searching from many times.