Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / December 2007

Tip: Looking for answers? Try searching our database.

PPT 2003/2007: How to identify all slides containing custom animat

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Jenkins - 08 Dec 2007 00:20 GMT
I have a requirement to list for my users the number of all their slides that
contain custom animations.   (Not the *count* of such slides, but the
slidenumbers themsleves.)

The following code fails in PPT 2007 and 2003 as well-- it doesn't recognize
a slide whose animation consists solely of a Disappear effect.  To test this,
create a perfectly blank slide (makes debugging easier) and insert a textbox
containing something.  Create an animation step that will Disappear the text
box on a mouse click.  Now run this code:

dim slidenums as new collection

For i = 1 To ActivePresentation.Slides.Count  
  For j = 1 To ActivePresentation.Slides(i).Shapes.Count
     If ActivePresentation.Slides(i).Shapes(j).AnimationSettings.Animate =
msoTrue Then
        slideNums.Add ActivePresentation.Slides(i).SlideNumber
        Exit For
     End If
  Next j  
Next i

' now display the slide numbers in a message box
If slideNums.Count = 0 Then
  MsgBox "No slides with animation found", vbOKOnly, "Animated Slides"
else
  ' i had some code here to display the slide numbers.  It's not germane.
end if

I get the "No slides ..." message in such cases.

Interestingly, if the Disappear is followed by an Appear, the code manages
to identify the slide.

So - is there a way to find such slides? How?  PowerPoint clearly knows how
to do it - how can I?

Signature

Dave Jenkins
K5KX

John Wilson - 08 Dec 2007 07:20 GMT
Hi Dave
You should never use .animation settings with versions after 2000, it is
there simply for backwards compatability. There are no exit animation in 200
which is why disappear is not recognised

To get what you need use the timeline object

eg

If osld.TimeLine.MainSequence.Count >0 then
If osld.TimeLine.InteractiveSequences.Count > 0 then 'triggered animations
count
Signature

Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk

> I have a requirement to list for my users the number of all their slides that
> contain custom animations.   (Not the *count* of such slides, but the
[quoted text clipped - 32 lines]
> So - is there a way to find such slides? How?  PowerPoint clearly knows how
> to do it - how can I?
Dave Jenkins - 08 Dec 2007 13:20 GMT
Thanks, John!  Exactly what I needed to know...
Signature

Dave Jenkins
K5KX

> Hi Dave
> You should never use .animation settings with versions after 2000, it is
[quoted text clipped - 45 lines]
> > So - is there a way to find such slides? How?  PowerPoint clearly knows how
> > to do it - how can I?
John Wilson - 08 Dec 2007 14:34 GMT
No problem
Signature

Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk

> Thanks, John!  Exactly what I needed to know...
>
[quoted text clipped - 47 lines]
> > > So - is there a way to find such slides? How?  PowerPoint clearly knows how
> > > to do it - how can I?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.