Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jan 2003
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Go to a slide by Name Property (xp)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Go to a slide by Name Property (xp)

    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

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Go to a slide by Name Property (xp)

    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").SlideInd ex

  4. #4
    Lounger
    Join Date
    Jan 2003
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Go to a slide by Name Property (xp)

    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 <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>

Posting Permissions

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