Run macro in all slides

  • Thread starter Thread starter vindys
  • Start date Start date
V

vindys

Try this one.

Sub img_border()
For i = 1 To ActivePresentation.Slides.Count
With ActivePresentation.Slides(i)
For j = 1 To ActivePresentation.Slides(i).Shapes.Count
With ActivePresentation.Slides(i).Shapes(j)
If .Type = msoLinkedPicture Or .Type = msoPicture Then

.Fill.Transparency = 0#
.Line.Weight = 5.75
.Line.Style = msoLineThinThick
.Line.Visible = msoTrue
.Line.ForeColor.RGB = RGB(150, 150, 150)
.Line.BackColor.RGB = RGB(255, 255, 255)
End If
End With
Next j
End With
Next i

End Sub
 
Hi

I record the macro below to make an border on images.
My question is there is a way to apply this macro to all images located in
all slides. I have a lot of images. So, if I use this macro, I should click
all the images and run the macro.

I will really appreciate if you help me out

Thank you

Sub img_border()

With ActiveWindow.Selection.ShapeRange
.Fill.Transparency = 0#
.Line.Weight = 5.75
.Line.Style = msoLineThinThick
.Line.Visible = msoTrue
.Line.ForeColor.RGB = RGB(150, 150, 150)
.Line.BackColor.RGB = RGB(255, 255, 255)
End With
End Sub
 
Back
Top