selectorText Property

Microsoft FrontPage Visual Basic

selectorText Property

Sets or returns a String that represents the selection string for a specified style sheet rule.

expression.selectorText

expression    Required. An expression that returns an IHTMLStyleSheetRule object.

Example

This example retrieves the selection string from the first style sheet rule in the first style sheet attached to the active document. This example assumes that you have at least one style sheet attached to the active document.

    Private Sub GetSelectorText()
    Dim objRule As IHTMLStyleSheetRule

    Set objRule = ActiveDocument.styleSheets(0).rules(0)
    
    ActiveDocument.body.insertAdjacentHTML "beforeend", _
        "<P>SELECTOR TEXT: " & objRule.selectorText & "</P>"
End Sub