Consulting

Results 1 to 5 of 5

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

  1. #1
    VBAX Regular
    Joined
    Oct 2013
    Posts
    17
    Location

    How can you name a slide and then refer to it by name in a hyperlink?

    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.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    The Hyperlink.SubAddress is a string like this:

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

    Example would be "257,2,My Slide"
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Regular
    Joined
    Oct 2013
    Posts
    17
    Location
    Quote Originally Posted by John Wilson View Post
    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?

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    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
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Newbie
    Joined
    Oct 2013
    Posts
    1
    Location
    Thanks to provide good information and i am searching from many times.
    soul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •