问题
I would like to crop a square image shape in PowerPoint with VBA to a specific form e.g. a circle.
With Shape.PictureFormat there are only these options:
- .CropBottom
- .CropLeft
- .CropRight
- .CropTop
Can someone help me with this question?
Thanks!
Moe
回答1:
From Microsoft Community - you can use Shape.AutoShapeType to "crop to shape."
Sub CropToCircle()
Dim shp As Shape
Set shp = ActivePresentation.Slides(1).Shapes(1)
If shp.Type = msoLinkedPicture Or shp.Type = msoPicture Then
shp.AutoShapeType = msoShapeOval
End If
End Sub
来源:https://stackoverflow.com/questions/51436712/how-to-crop-an-image-with-vba-to-a-specific-form-e-g-circle-in-powerpoint