Home Products Customers Tips VBA OfficeOne on Mac Contact us

Start a slide show from a specific slide

The following VBA code demonstrates how start a slide show from a specific slide:

Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function LockWindowUpdate Lib "user32" ( _
    ByVal hwndLock As Long) As Long

Sub LaunchSlideShowFromSlide(ByVal Pres As Presentation, _
    ByVal SlideIndex As Long)

    On Error Resume Next

    LockWindowUpdate GetDesktopWindow()
    With Pres.SlideShowSettings.Run
        .View.GotoSlide SlideIndex
    End With
    LockWindowUpdate 0
End Sub

Sub Test()
    LaunchSlideShowFromSlide ActivePresentation, 3
End Sub

Home | Products | Tips | VBA | FAQ | Utilities | Disclaimer | Privacy Policy | Mac | Links | Contact us

Contact OfficeOne on email at officeone@officeoneonline.com. Copyright © 2001-2018 OfficeOne. All rights reserved.

page counter