如何使用 VBA 在 Powerpoint 2007 中将图像纵横比设置为 100 %



我正在研究自动化工具。我想在每张幻灯片上将图像纵横比设置为 100%。vba中有什么属性吗?

谢谢。

你的意思是这样吗?

Option Explicit
Sub Sample()
    Dim shp As Shape
    Set shp = ActivePresentation.Slides(1).Shapes("Picture 1")
    With shp
        .ScaleHeight 1, msoTrue
        .ScaleWidth 1, msoTrue
    End With
End Sub

最新更新