change slide index and shape name to suit.
Sub CropTest()
Dim sld As Slide
Dim shp As Shape
Dim overHang As Double
Set sld = ActivePresentation.Slides(1)
Set shp = sld.Shapes("Picture 4")
Debug.Print "Slide Width ", sld.Design.SlideMaster.Width
Debug.Print "Shape", "Left="; shp.Left, "Width="; shp.Width
If (shp.Left + shp.Width) > sld.Design.SlideMaster.Width Then
overHang = (shp.Left + shp.Width) - sld.Design.SlideMaster.Width
Debug.Print "Over hang of ", overHang
shp.PictureFormat.CropRight = overHang
Else
Debug.Print "On slide"
End If
End Sub
Bookmarks