【发布时间】:2021-08-25 20:58:31
【问题描述】:
我正在尝试获取一个脚本,它将以 1:1 的纵横比裁剪图像,下面是我正在尝试的脚本,但它被裁剪为椭圆形。
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
谁能帮帮我。
提前致谢。
【问题讨论】:
-
你研究过Shape.ScaleHeight或Shape.ScaleWidth吗? docs.microsoft.com/en-us/office/vba/api/excel.shape.scaleheight
-
是的,我已经完成了,但没有成功
标签: vba powerpoint