PC Review


Reply
Thread Tools Rate Thread

Address the Active Slide... (PPT 2002)

 
 
=?Utf-8?B?VHJldm9yIFdpbGxpYW1z?=
Guest
Posts: n/a
 
      4th Apr 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9obiBXaWxzb24=?=
Guest
Posts: n/a
 
      4th Apr 2007
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

 
Reply With Quote
 
=?Utf-8?B?VHJldm9yIFdpbGxpYW1z?=
Guest
Posts: n/a
 
      4th Apr 2007
Thanks John

Strange that MS haven't built in an ActiveSlide object...

Trevor


"John Wilson" wrote:

> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programatically (VBA) copy and paste all objects from a slide of anon-active presentation to current slide quiquejbb Microsoft Powerpoint 1 22nd Mar 2010 09:39 PM
Get number of currently active slide Clevedog Microsoft Powerpoint 0 7th Jul 2008 10:06 PM
Lookup an email address in the Global Address List or Active Direc Omar Microsoft Access VBA Modules 2 16th Dec 2007 10:59 AM
Insertng slide from another presentation into active after selected slide Tyron Microsoft Powerpoint 4 8th Jun 2005 04:08 PM
Active web page in slide Tim B Microsoft Powerpoint 1 23rd Dec 2003 12:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:03 AM.