ncssKbd Property

Microsoft FrontPage Visual Basic

ncssKbd Property

Returns or sets a Boolean that determines if the text in a given text range will be rendered with a fixed-width font. Read/write.

expression.ncssKbd

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

Example

The following example sets all text ranges within CITE elements to be rendered with a fixed-width font.

    Sub SetWidth()
'Wraps a text range in kbd tags
 
    Dim objSs As IFPStyleState
    Dim objLine1 As IHTMLElement
    Dim strHTML As String
    
    strHTML = "This is sample text. <br> <cite>This is cited and will appear with a fixed-width font.</cite>"
    
    Application.ActiveDocument.body.innerHTML = strHTML
    
    For Each objLine1 In Application.ActiveDocument.all.tags("cite")
        Set objSs = Application.ActiveDocument.createStyleState
        objSs.gatherFromElement objLine1
        objSs.ncssKbd = True
        objSs.apply
    Next objLine1

End Sub