Address the Active Slide... (PPT 2002)

G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top