T
technoknight
I am into PowerPoint Automation.
Before I explain my problem I would like to describe a PowerPoint's
behaviour since my problem is related to it. Suppose you created a
presentation with 10 slides. You select slide no. 4 and click on the symbol
for "SlideShow (from current slide)". The slideshow will start from Slide
No.4. Now suppose you hit backspace during slideshow it will take you to
slide no.3. Subsequent backspaces will take you to previous animated items on
previous slides untill you reach slide 1.
Here is my problem:
I need to programmatically start the slideshow from the currently selected
slide. So, what I did is I first found which slide is selected. After that I
wrote the following code to start the slideshow from the currently selected
slide:
With App_.ActivePresentation.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
If .RangeType = ppShowSlideRange Then
.StartingSlide = .StartingSlide
.EndingSlide = .EndingSlide
ElseIf .RangeType = ppShowAll Then
.RangeType = ppShowSlideRange
.StartingSlide = firstselectedslide
.EndingSlide = App_.ActivePresentation.Slides.Count
End If
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
.Run
End With
I have put this check: "If .RangeType = ppShowSlideRange Then" for the case
where the user has explicitly set the Start and End slide using the
"SlideShow->Set Up Show" menu item. But lets forget this part for now.
So now the user selects a slide and clicks my "custom button" to start the
slideshow. Now, I have to first check the selected slide. Then change the
RangeType to ppShowSlideRange and then only I can show the slideshow from the
selected slide. But, the problem is if I hit backpsace during slideshow it
won't go to the previous slide (previous to the selected slide). I guess this
is becoz RangeType=ppShowSlideRange. But, if I don't do
RangeType=ppShowSlideRange then I cannot start the slideshow from the
currently selected slide programmatically.
This might be a bit confusing but I hope you have understood my problem. Is
there any way I can programmatically start the slideshow from the currently
selected slide and also enable going back to previous slides during the
slideshow when user hits backspace (or back arrow) ?
Please help. Thanks a lot in advance.
Before I explain my problem I would like to describe a PowerPoint's
behaviour since my problem is related to it. Suppose you created a
presentation with 10 slides. You select slide no. 4 and click on the symbol
for "SlideShow (from current slide)". The slideshow will start from Slide
No.4. Now suppose you hit backspace during slideshow it will take you to
slide no.3. Subsequent backspaces will take you to previous animated items on
previous slides untill you reach slide 1.
Here is my problem:
I need to programmatically start the slideshow from the currently selected
slide. So, what I did is I first found which slide is selected. After that I
wrote the following code to start the slideshow from the currently selected
slide:
With App_.ActivePresentation.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
If .RangeType = ppShowSlideRange Then
.StartingSlide = .StartingSlide
.EndingSlide = .EndingSlide
ElseIf .RangeType = ppShowAll Then
.RangeType = ppShowSlideRange
.StartingSlide = firstselectedslide
.EndingSlide = App_.ActivePresentation.Slides.Count
End If
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
.Run
End With
I have put this check: "If .RangeType = ppShowSlideRange Then" for the case
where the user has explicitly set the Start and End slide using the
"SlideShow->Set Up Show" menu item. But lets forget this part for now.
So now the user selects a slide and clicks my "custom button" to start the
slideshow. Now, I have to first check the selected slide. Then change the
RangeType to ppShowSlideRange and then only I can show the slideshow from the
selected slide. But, the problem is if I hit backpsace during slideshow it
won't go to the previous slide (previous to the selected slide). I guess this
is becoz RangeType=ppShowSlideRange. But, if I don't do
RangeType=ppShowSlideRange then I cannot start the slideshow from the
currently selected slide programmatically.
This might be a bit confusing but I hope you have understood my problem. Is
there any way I can programmatically start the slideshow from the currently
selected slide and also enable going back to previous slides during the
slideshow when user hits backspace (or back arrow) ?
Please help. Thanks a lot in advance.