Hyperlink to play .wav file with Win Media Player

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krdbjd
    New Member
    • Feb 2013
    • 5

    Hyperlink to play .wav file with Win Media Player

    MS Access 2000 database. When I dbl click hywerlink (K:/music/123.wav) path it plays in sndrec32 (I think). I want to use Media Player instead so I can have some control of the audio. .MP3 and Midi files launch WMP as desired, but will not work with .wav.
    Any help will be appreciated.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    The user can choose to open wav files with windows media player by default. If you want to force it regardless of the user's preference, you can open windows media player and pass it the file as an argument.

    Comment

    • krdbjd
      New Member
      • Feb 2013
      • 5

      #3
      Not sure what you mean as an argument... I set (in Explorer) the default program to use for .wav files as WMP and .wmp files open with WMP when a .wav file is clicked from file manager (Explorer). When the file address is put in a hyperlink field in MS Access and clicked, it opens in something else. Not sure what as I cannot find it even in process explorer. I have opened WMP before clicking the hyperlink and it also did not work. How can I code the hyperlink in MS Access to send the .wav file to WMP??? Strange that a midi or MP3 file is put in the hyperlink it works fine.
      BTW - I am using XP pro and Access 2000

      Thank you for the reply...

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        I don't know why setting the default didn't work.

        You can still issue a command to explicitly open windows media player. An argument is a parameter that you pass along with the command.

        For example, if I want to open windows media player and have it automatically play a song, I would issue this command in the command prompt.

        Code:
        wmplayer "C:\Song Folder\song.wav"
        You can issue the same command using VBA code.

        Comment

        • krdbjd
          New Member
          • Feb 2013
          • 5

          #5
          My problem is that I need to enter a hyperlink or other command in a MS Access database. WMP works fine from the run box or just dbl clicking in file manager... I did try what you suggested in the hyperlink column in Access but could find no combination that would work. WMP will start if I just enter the location of wmplayer.exe, but as soon as I try to add an argument, i.e. file name and location it errors out.

          Thank you

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            You don't put that command in the hyperlink. You use the on click event of the control to run VBA code that calls the command.

            Comment

            • krdbjd
              New Member
              • Feb 2013
              • 5

              #7
              Will be a few days - ordered a couple books on MS Access programming and VBA programming. Books are cheap, shipping 3x cost of books... Will come back and post after I get some reading done...

              Thanks for the help

              Comment

              • krdbjd
                New Member
                • Feb 2013
                • 5

                #8
                Adding - I have found that the hyperlinks work fine in WIN 7. It will open WMP as desired instead of playing in the background as it does in Win XP. I will post back if I find a solution to the XP delima...

                Comment

                Working...