Announcement

Collapse
No announcement yet.

Unconfigured Ad Widget

Collapse

Select Specific Slide From .pps Show

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Select Specific Slide From .pps Show

    Hello again,

    I am trying to use excel to open a specific slide on a specific .pps show.

    In my sheet, I have the network address of the .pps file in one cell and the number of the slide I want to show in another.

    This is what I've got..


    Code:
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    Const ERR_APP_NOTFOUND As Long = 429
        On Error Resume Next
    
    Dim X As String
    Dim Y As String
    
      
      
    If Intersect(Target, Range("STARTTIME")) Is Nothing Then
    Else
       
           ' X = Location of .pps   
           'Y = Number of slide to start from
                          X = Target.Offset(0, 5).Text
                          Y = Target.Offset(O, 8).Text
        
              Set objApp = CreateObject("PowerPoint.Application")
        If Err = ERR_APP_NOTFOUND Then
             MsgBox "Power Point isn't installed on this computer. Could not automate PowerPoint."
            Exit Sub
        End If
         
        With objApp
            .Activate
            .Presentations.Open Filename:=X, ReadOnly:=msoFalse
            .ActivePresentation.Slides(Y).Select
      
      
      ' I tried this but didn't work either -->   ActiveWindow.View.GotoSlide Index:=Y
                 End With
        Set objApp = Nothing
                   
                Exit Sub
           End If
    The slideshow opens fine but does not go to the correct slide number.

    I can use this same code to open a .ppt file and it does go to the correct slide number. But not sure how to get it to start playing from this point without having to hit {shift} {F5}.


    Any ideas would be great.

    Thanks,

  • #2
    Re: Select Specific Slide From .pps Show

    Try
    ActivePresentation.SlideShowWindow.View.GotoSlide (Y)
    John Wilson
    PowerPoint MVP
    Free PowerPoint Tutorials

    Comment


    • #3
      Re: Select Specific Slide From .pps Show

      I tried your code in several different locations, but would not work with a .pps.

      I was able to use sendkeys to simulate a shift f5 command but that's not really what I was hoping to do.

      Any suggestions?

      Thanks,

      Comment

      Trending

      Collapse

      There are no results that meet this criteria.

      Working...
      X