I wrote a macro to batch crop and resize the pictures in selected slides, the resize work good, but after I added the crop codes, it is not working. Please see the codes as below, is there any thing wrong? welcome and thanks suggestion.
Sub crpicture ()
Dim osld As Slide
Dim oshp As Shape
For Each osld In ActiveWindow.Selection.SlideRange
For Each oshp In osld.Shapes
oshp.PictureFormat.CropLeft = 0
oshp.PictureFormat.CropTop = 0.5 * 72
oshp.PictureFormat.CropRight = oshp.Width - oshp.Height
oshp.PictureFormat.CropBottom = 0
oshp.Height = 3 * 72
oshp.Left = 3.4 * 72
oshp.Top = 0.7 * 72
oshp.ZOrder msoSendToBack
Next
Next
End Sub