PowerPoint Creative
Log In or Register to participate in PPC!
PowerPoint Creative
Log In or Register to participate in PPC!

Go down
GamesByTim
GamesByTim
Featured Creator
Featured Creator
Posts : 248
Join date : 2017-10-09
https://www.gamesbytim.com/

VBA to start slide show on specific slide Empty VBA to start slide show on specific slide

Fri Jul 31, 2020 5:49 pm
It is possible to start a slide show on the first slide with the following VBA:

Code:
ActivePresentation.SlideShowSettings.Run

How, if possible, can you start a slide show on a specific slide number (or current slide) with VBA? So far, I haven't found a solution online.
rusnakcreative
rusnakcreative
Administrator
Administrator
Posts : 632
Join date : 2017-08-16
https://www.rusnakcreative.com

VBA to start slide show on specific slide Empty Re: VBA to start slide show on specific slide

Fri Jul 31, 2020 11:58 pm
Have you tried using this line immediately after?
Code:
ActivePresentation.SlideShowWindow.View.GotoSlide (1)
GamesByTim
GamesByTim
Featured Creator
Featured Creator
Posts : 248
Join date : 2017-10-09
https://www.gamesbytim.com/

VBA to start slide show on specific slide Empty Re: VBA to start slide show on specific slide

Sat Aug 01, 2020 3:11 pm
Yeah, that's what I'm currently doing. I'm hoping to prevent showing the first slide if possible.
PPT Dev
PPT Dev
PPT Creator
PPT Creator
Posts : 81
Join date : 2020-07-09
Location : USA
https://www.youtube.com/channel/UCmHvRg60FMXwpwYV1TliCVw

VBA to start slide show on specific slide Empty Re: VBA to start slide show on specific slide

Tue Aug 04, 2020 3:28 am
Message reputation : 100% (1 vote)
If you never need to view the slide at all in the presentation, you can tag the slide as "hidden" in the navigation pane so that it never appears in the presentation.
GamesByTim
GamesByTim
Featured Creator
Featured Creator
Posts : 248
Join date : 2017-10-09
https://www.gamesbytim.com/

VBA to start slide show on specific slide Empty Re: VBA to start slide show on specific slide

Tue Aug 04, 2020 4:11 pm
xPLAYn wrote:If you never need to view the slide at all in the presentation, you can tag the slide as "hidden" in the navigation pane so that it never appears in the presentation.

What an ingenious idea of hiding slides! This solved my problem.

For instance, to start to slide show at slide 9:

Code:
Dim i As Integer, j As Integer
' Temporarily hide slides 1-8
For i = 1 to 8
   ActivePresentation.Slides(i).SlideShowTransition.Hidden = msoTrue
Next i
' Start the slide show (will start at slide 9 because the first 8 slides are hidden)
ActivePresentation.SlideShowSettings.Run
' Unhide slides 1-8
For j = 1 to 8
   ActivePresentation.Slides(j).SlideShowTransition.Hidden = msoFalse
Next j
Sponsored content

VBA to start slide show on specific slide Empty Re: VBA to start slide show on specific slide

Back to top
Permissions in this forum:
You cannot reply to topics in this forum