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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling default media player 1

Status
Not open for further replies.

manny1234

IS-IT--Management
Mar 13, 2006
58
US
What would the syntax be to call my default media player ie Winamp, Itunes, or Windows Media player. Like calling
Code:
%System Root%

I have
Code:
Private Sub Command739_Click()
On Error GoTo Err_Command739_Click

    Dim stAppName As String

    stAppName = "C:\Program Files\Windows Media Player\wmplayer.exe \\DOKKEN\H\DONOTDELETE.WAV"
    Call Shell(stAppName, 1)

Exit_Command739_Click:
    Exit Sub

Err_Command739_Click:
    MsgBox Err.Description
    Resume Exit_Command739_Click
    
End Sub

I want to replace c:\Program Files... with whatever the syntax is to call the default media player.
 
How about FollowHyperlink?
FollowHyperlink "C:\Dirs\Dir\Sounds.Wav
 
that works, is there anyway of shutting off the warning about how you might be downloading viruses etc. I put in DoCmd.SetWarnings False and it did squat.
 
You may try this:
CreateObject("WScript.Shell").Run "\\DOKKEN\H\DONOTDELETE.WAV", 7

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top