owningElement Property

Microsoft FrontPage Visual Basic

owningElement Property

Returns an IHTMLElement object that represents the element where a stylesheet is referenced.

expression.owningElement

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example creates a style sheet reference in the active document and then sets the onload attribute that specifies the script to run when the style sheet loads.

    Dim objStyleSheet As FPHTMLStyleSheet

Set objStyleSheet = ActiveDocument.createStyleSheet("web.css")

objStyleSheet.owningElement.onload = "script()"