mnb4vba2007in2010 said:
How are you supposed to program to play a sound in VBA (Outlook2007)?
What sort of sound? A simple WAV file can be done like this:
Private Declare Function PlaySound Lib "winmm.dll" Alias
"PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal
dwFlags As Long) As Long
Public Sub PlayWave(ByVal FileName As String)
Const SND_ASYNC As Long = &H1
Const SND_FILENAME As Long = &H20000
Call PlaySound(FileName, 0&, SND_ASYNC Or SND_FILENAME)
End Sub