Table of contents
TOC
Collapse the table of content
Expand the table of content

WebPageOptions.BackgroundSound Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns or sets a String that specifies the path to a sound file that is played when the Web page is loaded in a Web browser. Read/write.

Syntax

expression. BackgroundSound

_expression_A variable that represents a WebPageOptions object.

Return Value

String

Remarks

The path to the background sound file must be a network path or a local path; an http:// address will not work.

If BackgroundSound is specified, the background sound will play once by default. The SetBackgroundSoundRepeat method can be used to specify whether the background sound should be played infinitely, and if it should not, to specify the number of times the background sound file should be played.

The background sound can be any of the following file types:

|.wav| |.mid| |.midi| |.rmi| |.au| |.aif| |*.aiff|

Example

The following example sets the background sound for page four of the active Web publication to a .wav file on the local computer. This .wav file will play once when the page is loaded in a Web browser.

Dim theWPO As WebPageOptions 

Set theWPO = ActiveDocument.Pages(4).WebPageOptions 

With theWPO 
 .BackgroundSound = "C:\CompanySounds\corporate_jingle.wav" 
End With
© 2018 Microsoft