Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vba to play mp3 file

Status
Not open for further replies.

dgillz

Instructor
Mar 2, 2001
10,044
US
Can anyone help with this? I would like vba to play a specified mp3 file. Code:

Private Sub Playfile
playfile ("c:\myfile.mp3")
End sub

Obviously the above is not working, and I know I need to create a function called playfile, but I have little idea how to start. Does anyone know how to do this?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
If you have a default mp3 player (In my case it was QuickTime), you can get the mp3 to play in an IE browser window using the following
Code:
Sub testMP3IE()
dim MusicPath as string
MusicPath = "I:/MyMusic/Ray Charles/Ray!/09 - Georgia On My Mind.mp3"
Application.FollowHyperlink MusicPath
End Sub
 
FollowHyperlink, for me, opens the MP3 in Windows Media Player.


unknown
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top