Code: Select all
Private Declare PtrSafe Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal IpszName As String, _
ByVal hModule As Long, ByVal dsFlags As Long) As Long 'I only half understand the declaration
Private Sub Document_Open()
PlaySound "c:\windows\media\alarm03.wav", ByVal0&, &H1 'And I don't understand the ByVal0&, &H1
End Sub
Code: Select all
Private Sub Document_Save()
IF ActiveDocument.Save Then
PlaySound "c:\windows\media\alarm03.wav", ByVal0&, &H1
EndIF
End Sub
TIA