G
george 16-17
Greetings all,
I am very new to PP vb and I have adapted the following code below based on
http://skp.mvps.org/ppt00040.htm#5 . I have a movie with an animation (a line
that wipes from the left that is set to the same speed as the length of the
video) that plays automatically. I have placed buttons on the slide to pause
and play the movie.
The code works fine, but the problem is when the movie ends. The buttons
will changed color when clicked even though the movie is not playing. I think
I need another If statement about whether the movie is actively playing. Can
anyone assist?
Here is the code:
Sub PauseShow()
'Pause button
With ActivePresentation.SlideShowWindow
If .View.State = ppSlideShowRunning Then
.View.State = ppSlideShowPaused
.View.Slide.Shapes("Play").TextFrame _
.TextRange.Font.Color = RGB(166, 166, 166) 'gray
.View.Slide.Shapes("Pause").TextFrame _
.TextRange.Font.Color = RGB(0, 43, 84) 'dark blue
End If
End With
End Sub
Sub ResumeShow()
'Play button
With ActivePresentation.SlideShowWindow
If .View.State = ppSlideShowPaused Then
.View.State = ppSlideShowRunning
.View.Slide.Shapes("Pause").TextFrame _
.TextRange.Font.Color = RGB(166, 166, 166)
.View.Slide.Shapes("Play").TextFrame _
.TextRange.Font.Color = RGB(0, 43, 84)
End If
End With
End Sub
Any assistance is appreciated and thanks in advance,
george
I am very new to PP vb and I have adapted the following code below based on
http://skp.mvps.org/ppt00040.htm#5 . I have a movie with an animation (a line
that wipes from the left that is set to the same speed as the length of the
video) that plays automatically. I have placed buttons on the slide to pause
and play the movie.
The code works fine, but the problem is when the movie ends. The buttons
will changed color when clicked even though the movie is not playing. I think
I need another If statement about whether the movie is actively playing. Can
anyone assist?
Here is the code:
Sub PauseShow()
'Pause button
With ActivePresentation.SlideShowWindow
If .View.State = ppSlideShowRunning Then
.View.State = ppSlideShowPaused
.View.Slide.Shapes("Play").TextFrame _
.TextRange.Font.Color = RGB(166, 166, 166) 'gray
.View.Slide.Shapes("Pause").TextFrame _
.TextRange.Font.Color = RGB(0, 43, 84) 'dark blue
End If
End With
End Sub
Sub ResumeShow()
'Play button
With ActivePresentation.SlideShowWindow
If .View.State = ppSlideShowPaused Then
.View.State = ppSlideShowRunning
.View.Slide.Shapes("Pause").TextFrame _
.TextRange.Font.Color = RGB(166, 166, 166)
.View.Slide.Shapes("Play").TextFrame _
.TextRange.Font.Color = RGB(0, 43, 84)
End If
End With
End Sub
Any assistance is appreciated and thanks in advance,
george