PictureFormat.CropBottom 屬性 (PowerPoint)
會傳回或設定要從指定之圖片或 OLE 物件底部裁去的點數。 讀取/寫入。
語法
運算式。CropBottom
表達 代表 PictureFormat 物件的 變數。
傳回值
單一
註解
裁剪尺寸會計算相對於圖片的原始大小。 例如,如果您插入原先為 100 點高的圖片、 其放大為 200 點高,並再將 cropbottom 等 屬性設為 50,100 點 (而不是 50 點) 將裁剪圖片的底部關閉。
範例
這個範例會從 myDocument 上第三個圖案的底部裁去 20 點。 為使本範例正常執行,第三個圖案必須是圖片或 OLE 物件。
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes(3).PictureFormat.CropBottom = 20
本範例根據使用者指定的百分比裁掉選取圖案的底部,而不論該圖案是否經過縮放。 為使本範例能正常執行,選取的圖案必須是圖片或是 OLE 物件。
percentToCrop = InputBox("What percentage do you " & _
"want to crop off the bottom of this picture?")
Set shapeToCrop = ActiveWindow.Selection.ShapeRange(1)
With shapeToCrop.Duplicate
.ScaleHeight 1, True
origHeight = .Height
.Delete
End With
cropPoints = origHeight * percentToCrop / 100
shapeToCrop.PictureFormat.CropBottom = cropPoints
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。