You can do this in two ways:
<ol>
You add the Media Components and then pass the file name to the component
You perform a <i>shell</i> command that will open <i>Windows Media Player</i> and passing the file path and name as argument
</ol>
Example
<pre>
Private Sub Command1_Click()
Dim path As String
Dim runExe As Double
path = "C:Program filesWindows Media Playerwmplayer.exe"
runExe = Shell(path & " c:mymusicfile.mp3", vbMaximizedFocus)
End Sub
</pre>
Last Wiki Answer Submitted: May 17, 2008 5:43 pm by alessandro.panzetta9,695 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.