WebPageOptions.BackgroundSoundLoopForever property (Publisher)

Returns a Boolean value that specifies whether the background sound attached to the webpage should be repeated infinitely. Read-only.

Syntax

expression.BackgroundSoundLoopForever

expression A variable that represents a WebPageOptions object.

Return value

Boolean

Remarks

The SetBackgroundSoundRepeat method is used to specify whether the background sound should be repeated infinitely after the page is loaded. Until the SetBackgroundSoundRepeat method is used to specify whether the background sound should be played infinitely, BackgroundSoundLoopForever is False.

Example

The following example sets the background sound for page four of the active web publication to a .wav file on the local computer. If BackgroundSoundLoopForever is False, the SetBackgroundSoundRepeat method is used to specify that the background sound should be repeated infinitely. The BackgroundSoundLoopForever property will now be True.

Dim theWPO As WebPageOptions 
 
Set theWPO = ActiveDocument.Pages(4).WebPageOptions 
 
With theWPO 
 .BackgroundSound = "C:\CompanySounds\corporate_jingle.wav" 
 If .BackgroundSoundLoopForever = False Then 
 .SetBackgroundSoundRepeat RepeatForever:=True 
 End If 
End With

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.