I have a MMControl (multi-media control) that will call a wave file, but it only works the first time it is called. Here is the code:
With FrmCHAT.MMControl1
If (.Mode = 526) Then
.Command = "Close"
End If
'Set properties needed by MCI to open.
.Notify = False
.Wait = True
.Shareable = False
.DeviceType = "WaveAudio"
.FileName = WaveFile
'Open the MCI WaveAudio device.
.Command = "Open"
.Command = "Play"
End With
With FrmCHAT.MMControl1
If (.Mode = 526) Then
.Command = "Close"
End If
'Set properties needed by MCI to open.
.Notify = False
.Wait = True
.Shareable = False
.DeviceType = "WaveAudio"
.FileName = WaveFile
'Open the MCI WaveAudio device.
.Command = "Open"
.Command = "Play"
End With