Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

Proud member of

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Change a picture to a rounded rectangle, set the rounding radius (PowerPoint 2007)

Problem

PowerPoint 2007 allows you to apply various shapes to pictures you've inserted onto your slides. Some of the shapes let you alter the shape using the yellow diamond adjustment handle. For example, the Rounded Rectangle shape lets you change the rounding radius of the corners.

But suppose you want to create a whole series of these and make each one identical. How do you match the rounding radius from one to the next?

As far as we know, there's no way to do it manually, but with VBA you can. Read on ...

Solution

First, set up one picture manually and adjust the yellow handle to give you the amount of corner radius you want.
Then while the picture is selected, run the GetRounding routine below to reveal the amount of rounding you've applied.

Sub GetRounding()

    Dim oSh As Shape
    Set oSh = ActiveWindow.Selection.ShapeRange(1)

    With oSh
        MsgBox .Adjustments(1)
    End With

    Set oSh = Nothing

End Sub

Next, select another inserted picture and run the following code after editing it where indicated to enter the rounding value you learned from the previous code:

Sub SetRounding()

    Dim oSh As Shape
    Dim sngRounding as Single

    ' EDIT THIS TO MATCH THE VALUE YOU GOT ABOVE
    sngRounding = 1.23 

    Set oSh = ActiveWindow.Selection.ShapeRange(1)

    With oSh
        oSh.AutoShapeType = msoShapeRoundedRectangle
        .Adjustments(1) = sngRounding
    End With

    Set oSh = Nothing

End Sub

See How do I use VBA code in PowerPoint? to learn how to use this example code.


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2022 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Change a picture to a rounded rectangle, set the rounding radius (PowerPoint 2007)
http://www.pptfaq.com/FAQ00968_Change_a_picture_to_a_rounded_rectangle-_set_the_rounding_radius_-PowerPoint_2007-.htm
Last update 07 June, 2011
Created: