PDA

View Full Version : VBA to advance PowerPoint Slide to Next slide



danbr96
03-03-2006, 01:36 PM
Please Help,
I am trying to create a Macro that will update 116 slides in PowerPoint that contain charts created using MS Chart. The chart in each slide has data that is linked to data tables in an excel file. I am able to update the data in the chart tables in PowerPoint on open when clicking update links. The chart images however remain static and do not update unless, I click the chart in each slide to open and close again.
I have been able to using the Macro recorder in Normal view create the following macro strings for slide 3 and slide 4.

Slide 3:
ActiveWindow.Selection.SlideRange.Shapes("Object 4").Select
ActiveWindow.Selection.ShapeRange.OLEFormat.DoVerb Index:=1
ActiveWindow.Selection.Unselect

Slide 4:
ActiveWindow.Selection.SlideRange.Shapes("Object 16").Select
ActiveWindow.Selection.ShapeRange.OLEFormat.DoVerb Index:=1
ActiveWindow.Selection.Unselect

The piece I am missing is how to get the VBA to advance from slide 3 to 4. The recorder does not seem to record anything when I click between slides. Can someone help me locate the missing code that will enable me to complete this.
Thank you,
Dan

danbr96
03-03-2006, 02:57 PM
Solved

I found code online that does the trick


ActiveWindow.View.GotoSlide index:=4