Run macro in all slides

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
 
D

DK Kang

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
 

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

Top