ncssDfn Property

Microsoft FrontPage Visual Basic

ncssDfn Property

Returns or sets a Boolean that indicates if the text range will be enclosed in a DFN element, indicating the defining instance of a text range.

expression.ncssDfn

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

Example

The following example uses the ncssDFN property to enclose the the first instance of italic text in the document within a DFN element.

    Sub SetNcssDfn()
 
    Dim objSs As IFPStyleState
    Dim objLine1 As IHTMLElement
    Dim strHTML As String
    
    strHTML = "This is sample text. <br> <I>This is italicized and will appear within DFN tags.</I>"
    
    Application.ActiveDocument.body.innerHTML = strHTML
    
    Set objLine1 = Application.ActiveDocument.all.tags("I").Item(0)
            
    Set objSs = Application.ActiveDocument.createStyleState
    objSs.gatherFromElement objLine1
    
    objSs.ncssDfn = True
    objSs.apply
            
End Sub