Open an audio file from Access
Bastienggg
-
Bastienggg -
Bastienggg -
Hello,
I would like to open Windows Media Player and play a song from an Access form. Let me explain. A simple button has been created, and when I click on it, I manage to open Windows Media Player, but I can't play the song I want. Access allows the opening of .exe files, but I can't play .wma or .mpa files.
Is this operation possible in code or otherwise?
Thank you in advance.
I would like to open Windows Media Player and play a song from an Access form. Let me explain. A simple button has been created, and when I click on it, I manage to open Windows Media Player, but I can't play the song I want. Access allows the opening of .exe files, but I can't play .wma or .mpa files.
Is this operation possible in code or otherwise?
Thank you in advance.
Configuration: Windows XP Internet Explorer 6.0
5 réponses
Private Sub Commande2_Click()
On Error GoTo Err_Commande2_Click
Dim stAppName As String
stAppName = "C:\Program Files\Windows Media Player\wmplayer.exe"
wmp.URL = "C:\Documents and Settings\adjoint\Bureau\NORMAL2.wav" => Line of code added
Call Shell(stAppName, 1)
Exit_Commande2_Click:
Exit Sub
Err_Commande2_Click:
MsgBox Err.Description
Resume Exit_Commande2_Click
End Sub
On Error GoTo Err_Commande2_Click
Dim stAppName As String
stAppName = "C:\Program Files\Windows Media Player\wmplayer.exe"
wmp.URL = "C:\Documents and Settings\adjoint\Bureau\NORMAL2.wav" => Line of code added
Call Shell(stAppName, 1)
Exit_Commande2_Click:
Exit Sub
Err_Commande2_Click:
MsgBox Err.Description
Resume Exit_Commande2_Click
End Sub