G
Geoff Cox
Hello,
I have used the sub below to add a Sound Effect to an EndShow action
button (type 132).
This works fine - problem is that on the slide with the Action Button
all other animation is removed!
The animation is the type where words are moved across the slide when
the enter key is pressed.
Anyone see why this happens?
Thanks
Geoff
Sub add_sound (strMyFile As String)
Dim oPresentation As Presentation
Set oPresentation = Presentations.Open(strMyFile)
With oPresentation
Dim oSl As Slide
For Each oSl In ActivePresentation.Slides
ActiveWindow.View.GotoSlide (oSl.SlideIndex)
Dim oSh As shape
Dim oHl As Hyperlink
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
Next oSh
Next oSl
oPresentation.Save
oPresentation.Close
End With
Set oSh = Nothing
Set oPresentation = Nothing
End Sub
I have used the sub below to add a Sound Effect to an EndShow action
button (type 132).
This works fine - problem is that on the slide with the Action Button
all other animation is removed!
The animation is the type where words are moved across the slide when
the enter key is pressed.
Anyone see why this happens?
Thanks
Geoff
Sub add_sound (strMyFile As String)
Dim oPresentation As Presentation
Set oPresentation = Presentations.Open(strMyFile)
With oPresentation
Dim oSl As Slide
For Each oSl In ActivePresentation.Slides
ActiveWindow.View.GotoSlide (oSl.SlideIndex)
Dim oSh As shape
Dim oHl As Hyperlink
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
Next oSh
Next oSl
oPresentation.Save
oPresentation.Close
End With
Set oSh = Nothing
Set oPresentation = Nothing
End Sub