BackgroundSoundLoopForever Property

Microsoft Publisher Visual Basic

BackgroundSoundLoopForever Property

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

expression.BackgroundSoundLoopForever

expression    Required. An expression that returns a WebPageOptions object.

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