Navigating To A Slide Through the Slide ID

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I write a macro so that a click on a certain slide object
cause another slide to be viewed based on its slide id?

Thanks.
 
The following macro should help you get started:

---
Sub GotoSlideById(ByVal SlideId As Long)
Dim Sld As Slide

With SlideShowWindows(1)
Set Sld = .Presentation.Slides.FindBySlideID(SlideId)
If Not (Sld Is Nothing) Then
.View.GotoSlide Sld.SlideIndex
End If
End With
End Sub
---

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 
David Tay said:
How can I write a macro so that a click on a certain slide object
cause another slide to be viewed based on its slide id?

Assuming you want this to happen during a slide show, then to go to slide 42,
assign this macro as the shape's action setting:

Sub GoToSlide42()
SlideShowWindows(1).View.GoToSlide(42)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top