PLAYSOUND Function
TOC
Collapse the table of content
Expand the table of content

PLAYSOUND Function

Office 2013 and later

Last modified: March 09, 2015

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example 1
Example 2

Plays a sound file or system sound.

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).

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.

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

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

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

Plays the system exclamation sound asynchronously with no warning beep.

Show:
© 2016 Microsoft