Consulting

Results 1 to 8 of 8

Thread: Navigation Using FindBySlideID Method

  1. #1

    Navigation Using FindBySlideID Method

    Apologies if this question seems too easy but I'm truly new to VBA.

    How can I use the FindBySlideID method to navigate from a shape that has been clicked on to another slide?

    I've tried the Microsoft help but it seems to be used for another purpose.

    If the FindBySlideID method is not appropriate for this purpose, how can I direct the powerpoint user to the appropriate slide on clicking the shape?

    Thanks!

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Hi David,

    You don't need VBA to do this. With your shape selected, go to
    Slide Show>Action Settings
    and on the Mouse Click tab, choose "Hyperlink to..", select "Slide..." and select the slide you want to jump to

    HTH
    K :-)

  3. #3

    Smile Navigation Using FindBySlideID Method

    Thanks for responding!

    Actually, I was hoping to have the user click on a shape that represents one of the answers to a question. The action setting will then be activated to run a sub that will navigate to the specific slide and at the same time activate a scoring variable.

    Am I making life too difficult for myself? Should I just do a sub for scoring and use the hyperlink method you suggested for navigational purposes?

    Appreciate your taking the time to respond to a novice's query.

  4. #4
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Should I just do a sub for scoring and use the hyperlink method you suggested for navigational purposes?
    Probably the easiest approach.
    K :-)

  5. #5

    Navigation Using FindBySlideID Method

    Guess that's what it has to be then!

    I was actually thinking of using the slideid for navigational purposes as it seems to be a constant for a specific slide in contrast to the slide index which changes with its position. Guess I will have to give meaningful names to the slides and then use the names for navigational references.

    Thanks for the input.

  6. #6
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Well its true that the SlideID is a fixed property and if it's more convenient to navigate that way, then it's not a problem - it just seems redundant to code it.

    To navigate, you need to use GoToSlide, which requires a slide index. FindBySlideID returns a slide object, so you can use it's SlideIndex property[VBA]ActiveWindow.View.GotoSlide ActivePresentation.Slides.FindBySlideID("256").SlideIndex[/VBA]
    K :-)

  7. #7

    Navigation Using FindBySlideID Method

    Appreciate the help but wonder how to use suggested code in a sub so that when a textbox is clicked the action setting will navigate to, say, SlideID 4?

    [vba] Sub GotoUsingSlideID3()
    '
    ' Macro created 01/04/2006 by David Tay
    '
    ActiveWindow.View.GotoSlide ActivePresentation.Slides.FindBySlideID("256").SlideIndex
    End Sub [/vba]
    What does ("256") in FindBySlideID mean?

    Here's hoping you aren't too busy!

    Thanks,
    David

  8. #8
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Well this is why using action settings is easier, since you don't normally have events to trigger code in PowerPoint. (You can create an addin that allows you to enable application events).
    The other option is to use activex controls in the presentation, I suppose, but I can't help thinking it's just over complicating things.

    The "256" in my example id the ID of the slide to navigate to, so you'd just edit that accordingly.
    K :-)

Posting Permissions

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