Shazam
10-15-2006, 10:13 AM
Hi everyone,
Can anyone modify this code below . It only runs for one slide I would like the code to run for each slide in the powerpoint . The number of slides varies time to time. I tried to run tis code below but it gives me a run-time error.
Sub Size_Picture()
Dim ppPres As PowerPoint.Presentation
Dim ppSlide As PowerPoint.Slide
Dim ppShape As PowerPoint.Shape
For Each ppSlide In ppPres.Slides
For Each ppShape In ppSlide.Shapes
ActiveWindow.Selection.SlideRange.Shapes("Picture 19").Select
ActiveWindow.Selection.ShapeRange.ScaleWidth 0.99, msoFalse, msoScaleFromTopLeft
ActiveWindow.Selection.ShapeRange.ScaleWidth 0.99, msoFalse, msoScaleFromBottomRight
ActiveWindow.Selection.Unselect
Next ppShape
Next ppSlide
End Sub
Can anyone modify this code below . It only runs for one slide I would like the code to run for each slide in the powerpoint . The number of slides varies time to time. I tried to run tis code below but it gives me a run-time error.
Sub Size_Picture()
Dim ppPres As PowerPoint.Presentation
Dim ppSlide As PowerPoint.Slide
Dim ppShape As PowerPoint.Shape
For Each ppSlide In ppPres.Slides
For Each ppShape In ppSlide.Shapes
ActiveWindow.Selection.SlideRange.Shapes("Picture 19").Select
ActiveWindow.Selection.ShapeRange.ScaleWidth 0.99, msoFalse, msoScaleFromTopLeft
ActiveWindow.Selection.ShapeRange.ScaleWidth 0.99, msoFalse, msoScaleFromBottomRight
ActiveWindow.Selection.Unselect
Next ppShape
Next ppSlide
End Sub