VBA error?

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
 
G

Geoff Cox

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

how get the Hammer sound? 1
TimeLine and Shyam! 0
VBA removes other animation?! 6
code not working - why? 10
VBA - make view active? 18
VBA question 11
finding oHl.Address for an action button? 2
vba logic? 7

Top