onbounce Property
Sets or returns a Variant that represents the onbounce attribute that is the script to run when the onbounce event fires.
expression.onbounce
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
The behavior attribute of the MARQUEE element must be set to "alternate" for the onbounce event to fire.
Example
The following example inserts a SCRIPT element into the head and replaces the text in the active document with a marquee, and then specifies the behavior and sets the value of the onbounce attribute for the MARQUEE element.
Dim objMarquee As FPHTMLMarqueeElement
With ActiveDocument
.body.innerHTML = "<marquee id=""newmarquee""></marquee>"
.all.tags("head").Item(0).innerHTML _
= "<script language=vbscript></script>"
End With
Set objMarquee = ActiveDocument.all.tags("marquee").Item("newmarquee")
With objMarquee
.behavior = "alternate"
.direction = "up"
.loop = 5
.height = "100%"
.width = "10%"
.onbounce = "script()"
.innerText = "Use Dynamic HTML to create compelling Web sites."
End With