Cannot play mp3 sound: Outlook.cmdstart_click

J

Jason

WAV files are fine but When trying to play aa mp3 file I get:

The specified alias is already being used in this application. Use a unique
alias.
(-2147221215) in Outlook.cmdStart_Click.

command called: PlayMp3Sound SoundFile

code:
strCommand = "open " & strShortPathAndFile & " Type MPEGVideo Alias MyMP3"
lngReturn = mciSendString(strCommand, 0&, 0&, 0&)
If lngReturn = 0 Then ' success
lngReturn = mciSendString("play MyMP3", 0&, 0&, 0&)
If lngReturn = 0 Then ' success
PlayMP3 = vbNullString
Else
'this is where the code steps through to
Call mciGetErrorString(lngReturn, strReturn128, 128)
PlayMP3 = TrimNull(strReturn128)
Err.Raise vbObjectError + lngReturn, "PlayMP3",
TrimNull(strReturn128)
End If
Else
Call mciGetErrorString(lngReturn, strReturn128, 128)
PlayMP3 = TrimNull(strReturn128)
Err.Raise vbObjectError + lngReturn, "PlayMP3",
TrimNull(strReturn128)
End If
Else

What is happening?

Thanks,
J.
 
Top