Thanks for your code. But, code represents total number of slides in a presentation.
I want to get into each slide in a presentation. I want to refer each and every slide in a presentation to update images in each slide using VBA.
Please check below procedures, I hope one of this will help to solve your query.
You can get the Active Slide Number using the below procedure
Sub sbGetActiveSlideNumber() actSldNo = ActiveWindow.Selection.SlideRange.SlideNumber MsgBox actSldNo End Sub
You can set the ActiveSlide to an object and do whatever you wants to.
Sub sbSetActiveSlideNumber() Set actSld = ActiveWindow.Selection.SlideRange 'to Get the slide number MsgBox actSld.SlideNumber ' Loop through all shapes in the slide For Each shp In actSld.Shapes MsgBox shp.Name Next End Sub
Set a Specific Slide to an object and do whatever you wants to.
Sub sbSetSpecificSlideNumber() Set actSld = ActivePresentation.Slides(5) ' Loop through all shapes in the slide For Each shp In actSld.Shapes MsgBox shp.Name Next End Sub
Loop through all slides and perform some thing in each slide.
Sub sbLoopAllSlides() 'Loop through all slides For Each sld In ActivePresentation.Slides 'Perform something in each slide For Each shp In sld.Shapes MsgBox shp.Name Next shp 'Or do something for a specific slide If sld.SlideNumber = 2 Then 'your statements End If Next sld End Sub