Consulting

Results 1 to 4 of 4

Thread: VBA Help with PowerPoint Custom Show

  1. #1

    VBA Help with PowerPoint Custom Show

    Hi,

    We have a slideshow that contains a custom show. The custom show is set to "Show and Return" so that when it is over the entire presentation does not exit. We want to be able to exit the custom show by clicking a link, and have the presentation go to a linked slide, not necessarily the slide from which the custom show was invoked.

    So far we have a macro that detects if it has been called from a custom show, and if so, sends an "esc" to end the custom show. Else it navigates to the proper slide:

    Sub exitCustomShow()

    With SlideShowWindows(1).View
    If .IsNamedShow Then
    SendKeys("{ESC}")

    Else
    navToSlide '(a macro defined elsewhere, it works)
    End If

    End With

    I can't figure out how to also run navToSlide following the call to SendKeys - it seems that sending the escape character terminates the macro..?

    How can we both exit the custom show AND navigate to a different slide?

    Thanks!

    -Bill

  2. #2
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    [vba]Sub exitCustomShow()
    With SlideShowWindows(1).View
    If .IsNamedShow Then
    .Exit
    Else
    navToSlide '(a macro defined elsewhere, it works)
    End If
    End With
    End Sub
    [/vba]

  3. #3
    Thanks - that led me to .EndNamedShow, which (so far) seems to be allowing the subsequent navigation we need...

    Thanks again,

    -Bill

  4. #4
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by blescohier
    Thanks - that led me to .EndNamedShow, which (so far) seems to be allowing the subsequent navigation we need...

    Thanks again,

    -Bill
    Be aware that using .EndNamedShow has different results than using .Exit.

    From the EndNamedShow description:
    Switches from running a custom, or named, slide show to running the entire presentation of which the custom show is a subset. When the slide show advances from the current slide, the next slide displayed will be the next one in the entire presentation, not the next one in the custom slide show.
    Whereas, using .Exit does the same as when you hit the 'Escape' key in the presentation - it exits the current show and returns where you started. If you linked to the current custom show from another custom show, you will return to the previous show via .Exit. I believe that using .EndNamedShow will place you into the entire presentation.

Posting Permissions

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