Solved

Playing a sound file using VBScript

Posted on 2004-04-29
2
472 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

803 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