The code will depend on whether you are in show mode:
Sub roundit()
Dim oshp As Shape
For Each oshp In ActivePresentation.SlideShowWindow.View.Slide.Shapes
If oshp.AutoShapeType = msoShapeRoundedRectangle Then
oshp.Adjustments.Item(1) = 0.1
End If
Next
End Sub
or edit mode:
Sub roundit2()
Dim oshp As Shape
On Error GoTo errhandler
For Each oshp In ActiveWindow.Selection.SlideRange.Shapes
If oshp.AutoShapeType = msoShapeRoundedRectangle Then
oshp.Adjustments.Item(1) = 0.1
End If
Next
Exit Sub
errhandler:
MsgBox "Is a slide selected?"
End Sub
--
Amazing PPT Hints, Tips and Tutorials-http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk/ppttipshome.html
email john AT technologytrish.co.uk
"Trevor Williams" wrote:
> I have the following code to reset the rounded corners on RoundedRectangles
> throughout a presentation. I need to amend it so it only changes shapes on
> the active slide but can't suss it out.
>
> Any help appreciated.
>
> .....
>
> Dim sld as Slide
>
> For Each sld In ActivePresentation.Slides
> For Each s In sld.Shapes
> If s.AutoShapeType = msoShapeRoundedRectangle Then
> s.Adjustments.Item(1) = 0.1
> End If
> Next
> Next