IHTMLBGsound Object

Microsoft FrontPage Visual Basic

IHTMLBGsound Object

IHTMLBGsound

Represents the BGSOUND element in an HTML document. The BGSOUND element plays a sound file in the background when a document is loaded into a browser. The IHTMLBGsound object provides access to a limited number of properties and methods related to the BGSOUND element. For access to all properties an methods, use the FPHTMLBGSound object.

Using the IHTMLBGsound object

Use the tags method to return an IHTMLElementCollection collection that represents all the BGSOUND elements in a document. Use the Item method to access a specific BGSOUND element, referenced by ordinal number or by the value of the id attribute. The following example accesses the first BGSOUND element in the active document.

    Dim objSound As IHTMLBGsound

Set objSound = ActiveDocument.all.tags("bgsound").Item(0)