• Go to a slide by Name Property (xp)

    Author
    Topic
    #442007

    I currently have a slide show where users can insert extra slides. This messes up the slide numbering. I would like a method attached to a button where key slides in the slide show can be called up wherever users have inserted slides.

    Viewing 1 reply thread
    Author
    Replies
    • #1062824

      Each slide in a presentation is automatically assigned a name Slide1, Slide2, etc.in the order in which they are created. These numbers are maintained even if the slides are moved around and if slides are inserted. So you can use an action button that executes a macro like this:

      Sub GoToSlide2()
      SlideShowWindows(1).View.GotoSlide ActivePresentation.Slides(“Slide2”).SlideIndex
      End Sub

    • #1062833

      Addition to my previous reply: you can also assign a custom name to a slide, for example in the Immediate window of the Visual Basic Editor. For example:

      ActivePresentation.Slides(5).Name = “SpecialSlide”

      You can then use this name in a macro:

      SlideShowWindows(1).View.GotoSlide ActivePresentation.Slides(“SpecialSlide”).SlideIndex

      • #1062852

        Hans, you are wonderful. I have already assigned Names to key slide in my presentation with the Properties Box, so your second reply is exactly what I require.

        Just as a point of interest, obviously your first method does not work if names have already been assigned via the Properties Box.

        Graham bananas

    Viewing 1 reply thread
    Reply To: Go to a slide by Name Property (xp)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: