VBA error?

  • Thread starter Thread starter Geoff Cox
  • Start date Start date
G

Geoff Cox

Hello,

The code below is aimed at finding an EndShow action button (type 132)
and adding a sound to it - but it isn't working! Ideas please.

Cheers

Geoff


For Each oSh In oSl.Shapes

If oSh.Type = 1 Then
If oSh.AutoShapeType = 132 Then
With oSh.ActionSettings(ppMouseClick)
.SoundEffect.ImportFromFile "C:\sound.wav"
End With
End If
End If

Next oSh
 
With oSh.ActionSettings(ppMouseClick)
.SoundEffect.ImportFromFile "C:\sound.wav"
.SoundEffect.Name "sound.wav"
End With

Shyam,

I am trying the following but not giving me the sound?!

By the way,

.SoundEffect.Name "sound.wav"

gives me an error message - "invlaid use of property" - highlighting
Name.

Geoff

Dim oSl As Slide

For Each oSl In ActivePresentation.Slides

Dim oSh As Shape
For Each oSh In oSl.Shapes
If oSh.Type = 1 Then
If oSh.AutoShapeType = 132 Then

With oSh.ActionSettings(ppMouseClick)
.SoundEffect.ImportFromFile "C:\sound.wav"
'.SoundEffect.Name "sound.wav"
End With
End If
End If

Next oSh
Next oSl
 
Back
Top