Try
ActivePresentation.SlideShowWindow.View.GotoSlide (Y)
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..
The slideshow opens fine but does not go to the correct slide number.VB: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
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,
Try
ActivePresentation.SlideShowWindow.View.GotoSlide (Y)
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,
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks