This is a known bug. You should not use the older AnimationSettings when
coding in the newer versions (PPT2002 or later). Changing media animation
settings using the older object model in the new version will kill the
assigned animations. Use the new Timeline object instead.
Regards,
Shyam Pillai
Animation Carbon
http://animationcarbon.com
> Hello,
>
[quoted text clipped - 46 lines]
>
> End Sub
Geoff Cox - 07 Oct 2006 20:04 GMT
>This is a known bug. You should not use the older AnimationSettings when
>coding in the newer versions (PPT2002 or later). Changing media animation
>settings using the older object model in the new version will kill the
>assigned animations. Use the new Timeline object instead.
Shyam,
How do I use the Timeline object? It applies to a slide and not to a
shape? I'm confused!
oSh.AnimationSettings.SoundEffect.Name = "Hammer"
The above line is wrong - but how do I apply the Timeline object?
Geoff
For Each oSh In oSl.Shapes
If oSh.Type = 1 Then
If oSh.AutoShapeType = 132 Then
If oSh.TextFrame.TextRange.Text <> "Classroom notes" Then
oSh.AnimationSettings.SoundEffect.Name = "Hammer"
End If
End If
End If
>Regards,
>Shyam Pillai
[quoted text clipped - 52 lines]
>>
>> End Sub
Geoff Cox - 07 Oct 2006 23:05 GMT
>This is a known bug. You should not use the older AnimationSettings when
>coding in the newer versions (PPT2002 or later). Changing media animation
>settings using the older object model in the new version will kill the
>assigned animations. Use the new Timeline object instead.
Shyam,
My aim is to add the Hammer sound effect to the already existing
EndShow button without deleting the other animation settings on that
slide, but cannot see how to do that using the Timeline object.
Fumbling my way forward the following code places an EndShow action
button on the slide which already has an EndShow action button on it
(with the idea of eventually deleting the current button and replacing
it with the new one which will have the sound effect) using the
Timeline object but I guess I need some parameters after Shape:=shpnew
on the line,
With sldNew.TimeLine.MainSequence.AddEffect(Shape:=shpnew)
I would like to add the Hammer sound effect and an EndShow hyperlink
to this new EndShow action Button but have no idea how to do it?!
Help!
Cheers
Geoff
For Each oSh In oSl.Shapes
If oSh.Type = 1 Then
If oSh.AutoShapeType = 132 Then
Set shpnew =
oSl.Shapes.AddShape(Type:=msoShapeActionButtonEnd, Left:=25, Top:=25,
Width:=100, Height:=100)
With sldNew.TimeLine.MainSequence.AddEffect(Shape:=shpnew)
End With
End If
End If
Next oSh
Next oSl
Shyam Pillai - 08 Oct 2006 14:44 GMT
Geoff,
Based on your additional info. I think it would be simpler to just add sound
to the existing action setting instead of try to assign an animation to it.
With oSh.ActionSettings(ppMouseClick)
.Action = ppActionEndShow
.SoundEffect.ImportFromFile "C:\my sounds\hammer.wav"
End With

Signature
Regards,
Shyam Pillai
Toolbox
http://skp.mvps.org/toolbox
>>This is a known bug. You should not use the older AnimationSettings when
>>coding in the newer versions (PPT2002 or later). Changing media animation
[quoted text clipped - 39 lines]
> Next oSh
> Next oSl
Geoff Cox - 08 Oct 2006 17:50 GMT
>Geoff,
>Based on your additional info. I think it would be simpler to just add sound
[quoted text clipped - 4 lines]
> .SoundEffect.ImportFromFile "C:\my sounds\hammer.wav"
> End With
Thanks for the idea Shyam - will give it a go.
Cheers
Geoff
Geoff Cox - 08 Oct 2006 18:10 GMT
>Geoff,
>Based on your additional info. I think it would be simpler to just add sound
[quoted text clipped - 4 lines]
> .SoundEffect.ImportFromFile "C:\my sounds\hammer.wav"
> End With
Shyam,
with the following code I am finding a type 132 (EndShow) button
and trying to add the sound to it - it's not working!?
Geoff
For Each oSh In oSl.Shapes
If oSh.Type = 1 Then
If oSh.AutoShapeType = 132 Then
If oSh.TextFrame.TextRange.Text <> "Classroom notes" Then
With oSh.ActionSettings(ppMouseClick)
'.Hyperlink.Delete
'.Action = ppActionEndShow
.SoundEffect.ImportFromFile _
"C:\a-winfiles\hala\docs\power-point\sounds\online.wav"
End With
End If
End If
End If
Next oSh
Next oSl