Option Explicit
'API Class to take care of playing the file
Public Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
Sub VBASound()
'Call Api to play LoadIt.wav which is in the same folder as
'the active document!
Call sndPlaySound32(ActiveDocument.Path & "\LoadIt.WAV", 0)
End Sub
|