Hello,

I'm attempting to use this Macro to center and size all pictures on all slides in a powerpoint presentation. The pictures center just fine but do not resize to the designated height and width values.
If anyone could help me with this it would be greatly appreciated, thanks!

Sub CenterAndSizePics()

Dim osld As Slide
Dim oshp As Shape
Dim x As Integer
Dim y As Integer

With ActivePresentation.PageSetup
x = .SlideWidth / 2
y = .SlideHeight / 2
End With

For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes

If oshp.Type = msoPicture Then
oshp.Left = x - (oshp.Width / 2)
oshp.Top = y - (oshp.Height / 2)
oshp.Height = 329.76
oshp.Width = 473.76

End If

Next
Next

End Sub