XP custom animations get removed when automated

  • Thread starter Thread starter sanil
  • Start date Start date
S

sanil

Hello,
Why does XP specific custom animations get lost if some
methods in the office XP object model are called?

When i try to set the porperty 'StopAfterSlides=99' thru
the PlaySettings object, the XP specifice custom
animations (eg: MotionPaths ) get removed. Why this so?

Please suggest the correct method so that i can set
the 'StopAfterSlides' property without loosing existing
custom animations.

For your convenience i present below the function i used:
--------------------------------------------------------
Dim sld As PowerPoint.Slide
Dim shps As PowerPoint.Shapes
Dim shp As PowerPoint.Shape
Dim eff As PowerPoint.Effect
Dim ein As PowerPoint.EffectInformation
Dim sq As PowerPoint.Sequence
Dim tm As PowerPoint.TimeLine
Dim pst As PowerPoint.PlaySettings


Set sld = Application.ActivePresentation.Slides(1)
Set shps = sld.Shapes

Set shp = shps.AddMediaObject
("c:\music\flourish.mid", 10, 10, 20, 20)
shp.Name = "CGBackgroundMusic"


Set tm = sld.TimeLine
Set sq = tm.MainSequence

Set eff = sq.AddEffect(shp, msoAnimEffectMediaPlay)

Set ein = eff.EffectInformation

eff.MoveTo 1

Set pst = ein.PlaySettings

pst.PauseAnimation = msoFalse
pst.PlayOnEntry = msoTrue
pst.LoopUntilStopped = msoTrue
pst.StopAfterSlides = 999


Set pst = Nothing
Set shps = Nothing
Set sld = Nothing
Set tm = Nothing
Set sq = Nothing
Set shp = Nothing
Set eff = Nothing
Set ein = Nothing
 
Sanil,
I've had several problems with assigning properties for media objects under
PowerPoint 2002/2003 including the one you've mentioned.

For your particular scenario. I would suggest that you insert a dummy slide
prior to this slide and add the audio there and have it play across the
slides..


--
Regards
Shyam Pillai

Image Importer Wizard
http://www.mvps.org/skp/iiw.htm
 
Back
Top