Solved

Playing a sound file using VBScript

Posted on 2004-04-29
2
467 Views
Last Modified: 2007-12-19
Does anybody know if it is possible to play a sound file from a vb script?
0
Comment
Question by:NorCal2612
  • 2
2 Comments
 
LVL 14

Accepted Solution

by:
aelatik earned 450 total points
ID: 10950813
Dim WSH, SND
SND = "c:\windows\media\ding.wav"
Set       WSH = CreateObject("Wscript.Shell")
      WSH.Run "sndrec32 /play /close """ & SND & """",0,True
Set       WSH = Nothing
0
 
LVL 14

Expert Comment

by:aelatik
ID: 10950825
Otherwise you need to wrap an api into a dll wich you can call with VBSCRIPT
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now