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
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