How to crop an image with VBA to a specific form e.g. circle in PowerPoint?

前端 未结 1 1827
故里飘歌
故里飘歌 2021-01-28 13:42

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:

  • .
相关标签:
1条回答
  • 2021-01-28 14:21

    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
    
    0 讨论(0)
提交回复
热议问题