PLAYSOUND Function

Plays a sound file or system sound.

Syntax

PLAYSOUND(" filename "|" alias ", isAlias, beep, synch )

Parameters

Name Required/Optional Data Type Description
filename
Required
String
The name of the sound file you want to play.
alias
Required
String
A system sound represented by an alias.
isAlias
Required
Boolean
Specifies whether the preceding expression is an alias or file name; use a non-zero value to specify an alias.
beep
Required
Boolean
Specifies whether Microsoft Visio beeps when sound can't be played; use a non-zero number to beep.
synch
Required
Boolean
Determines whether sounds are played asynchronously (0) or synchronously (1).

Remarks

You should usually play sounds asynchronously so that Visio can continue processing while it plays the sound. To string several sounds together, play them synchronously, or some might fail to play.

Example 1

PLAYSOUND("chord.wav", 0, 0, 0)

Plays the wave audio file chord.wav asynchronously with no warning beep.

Example 2

PLAYSOUND("SystemExclamation", 1, 0, 0)

Plays the system exclamation sound asynchronously with no warning beep.