This example crops 20 points off the bottom of shape three on the active document. For the example to work, shape three must be either a picture or an OLE object.
ActiveDocument.Shapes(3).PictureFormat.CropBottom = 20
This example crops the percentage specified by the user off the bottom of the selected shape, regardless of whether the shape has been scaled. For the example to work, the selected shape must be either a picture or an OLE object.
percentToCrop = InputBox("What percentage do you want " _
& "to crop off the bottom of this picture?")
Set shapeToCrop = _
ActiveDocument.ActiveWindow.Selection.ShapeRange(1)
With shapeToCrop.Duplicate
.ScaleHeight 1, True
origHeight = .Height
.Delete
End With
cropPoints = origHeight * percentToCrop / 100
shapeToCrop.PictureFormat.CropBottom = cropPoints