我写了一个宏来批量裁剪和调整选定幻灯片中的图片大小,调整大小效果很好,但是在我添加了裁剪代码后,它就不起作用了。请看下面的代码,有什么问题吗?欢迎并感谢建议。
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