Thanks PHV but this code doesn't help me out. I would like to have the soundwav start playing when the document is opened and then looped until the document is closed. Can you help me with that code? Thank you so much!
Sadie
Public Declare Function sndPlaySound Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
In the ThisDocument class module:
Code:
Const SND_ASYNC = &H1
Const SND_LOOP = &H8
Private Sub Document_Open()
Dim strWav As String
strWav = "\path\to\file.wav"
sndPlaySound strWav, SND_ASYNC Or SND_LOOP
End Sub
Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.