View Single Post
 
Old 07-31-2023, 03:26 AM
JohnWilson JohnWilson is offline Windows 10 Office 2019
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Basic code is
Code:
Sub croptoshape()
Dim shp As Shape
    Set shp = ActiveWindow.Selection.ShapeRange(1)
    If shp.Type = msoLinkedPicture Or shp.Type = msoPicture Then
        shp.AutoShapeType = msoShapeOval
        shp.Line.Weight = 10
        shp.Line.ForeColor.RGB = RGB(120, 120, 120)
    End If
End Sub
Note this will crop to an OVAL unless the original pic is square
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote