返回或设置从指定图片或 OLE 对象的右边所裁剪下的磅数。可读写。Single 类型。
注意 裁剪以其相对于图片初始大小来计算。例如,如果插入一个原为 100 磅宽的图片,并将其宽度改变为 200 磅,然后将 CropRight 属性设为 50,则将会从图片右边裁减掉 100 磅(而不是 50 磅)。
本示例在 myDocument
中第三个形状的右侧裁剪了 20 磅。要使本示例执行,第三个形状必须是图片或 OLE 对象。
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes(3).PictureFormat.CropRight = 20
本示例从选定的形状右边裁减掉用户指定的比例,不管该形状是否被改变过比例。要使本示例执行,选定的形状必须是图片或 OLE 对象。
percentToCrop = InputBox("What percentage do you " & _
"want to crop off the right of this picture?")
Set shapeToCrop = ActiveWindow.Selection.ShapeRange(1)
With shapeToCrop.Duplicate
.ScaleWidth 1, True
origWidth = .Width
.Delete
End With
cropPoints = origWidth * percentToCrop / 100
shapeToCrop.PictureFormat.CropRight = cropPoints