none
Resume PP Show at Correct Slide RRS feed

  • Question

  • Hi,
    I have a command button that updates an embedded excel sheet/chart based on a series of check box values.  The whole thing runs great except when it resumes the slideshow after updating the show always goes back to slide 1.  How do I get this to resume at the correct slide?  Even better, is there a way to get everything to update w/out exiting presentation mode?  This is what's running now:

    Private Sub CommandButton1_Click()
    SlideShowWindows(Index:=1).View.Exit

    'Check CheckBox1 Value (0/1 = False/True)


    'False = unchecked box = 0 value for condition

    'Select Excel sheet for conditions
    With ActiveWindow.Selection.SlideRange.Shapes("Object 4")
            .OLEFormat.DoVerb ppOLEVerbHide
        With .OLEFormat.Object.Application
            With .workbooks(1).worksheets(1)
    'Test CheckBox1 Value(0/1 = False/True)
                If CheckBox1.Value = False Then
                .Range("G11").Value = "0"
                Else
                .Range("G11").Value = "1"
                End If
    'Test CheckBox2 Value(0/1 = False/True)
                If CheckBox2.Value = False Then
                .Range("G12").Value = "0"
                Else
                .Range("G12").Value = "1"
                End If
    'Test CheckBox3 Value(0/1 = False/True)
                If CheckBox3.Value = False Then
                .Range("G13").Value = "0"
                Else
                .Range("G13").Value = "1"
                End If
    'Test CheckBox4 Value(0/1 = False/True)
                If CheckBox4.Value = False Then
                .Range("G14").Value = "0"
                Else
                .Range("G14").Value = "1"
                End If
    'Test CheckBox5 Value(0/1 = False/True)
                If CheckBox5.Value = False Then
                .Range("G15").Value = "0"
                Else
                .Range("G15").Value = "1"
                End If
    'Test CheckBox6 Value(0/1 = False/True)
                If CheckBox6.Value = False Then
                .Range("G16").Value = "0"
                Else
                .Range("G16").Value = "1"
                End If
    'Test CheckBox7 Value(0/1 = False/True)
                If CheckBox7.Value = False Then
                .Range("G17").Value = "0"
                Else
                .Range("G17").Value = "1"
                End If
    'Test CheckBox8 Value(0/1 = False/True)
                If CheckBox8.Value = False Then
                .Range("G18").Value = "0"
                Else
                .Range("G18").Value = "1"
                End If
            End With
            .Quit
        End With
    End With

    'Return to Presentation Mode

    With ActivePresentation.SlideShowSettings
            .ShowType = ppShowTypeSpeaker
            .LoopUntilStopped = msoFalse
            .ShowWithNarration = msoTrue
            .ShowWithAnimation = msoTrue
            .RangeType = ppShowAll
            .AdvanceMode = ppSlideShowUseSlideTimings
            .PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
            .Run
    End With
    End Sub


    Thanks!

    Thursday, August 20, 2009 7:14 PM

Answers

  • Hello,

    We could save the current slide index by using this property:

    ActivePresentation.SlideShowWindow.View.Slide.SlideIndex

    When resume we could go back to the slide by this method:

    ActivePresentation.SlideShowWindow.View.GotoSlide

    Thanks
    We have published a VSTO FAQ recently, you can view them from the entry thread VSTO FAQ.
    If you have any feedbacks or suggestions on this FAQ, please feel free to write us emails to colbertz@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Tim Li Thursday, August 27, 2009 7:13 AM
    Tuesday, August 25, 2009 7:22 AM

All replies

  • No ideas, anybody?  I'm guessing it has something to do with resuming the show and the code I hav may be only to start a new show . . .
    Sunday, August 23, 2009 1:04 AM
  • Hello,

    We could save the current slide index by using this property:

    ActivePresentation.SlideShowWindow.View.Slide.SlideIndex

    When resume we could go back to the slide by this method:

    ActivePresentation.SlideShowWindow.View.GotoSlide

    Thanks
    We have published a VSTO FAQ recently, you can view them from the entry thread VSTO FAQ.
    If you have any feedbacks or suggestions on this FAQ, please feel free to write us emails to colbertz@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Tim Li Thursday, August 27, 2009 7:13 AM
    Tuesday, August 25, 2009 7:22 AM