Share via


IFPStyleLength Object

IFPStyleState
IFPStyleLength

Contains information about the measurement properties of a style attribute associated with a given element or text range on the current page.

Using the IFPStyleLength object

Use the createStyleLength method of the IFPStyleState object to return an IFPStyleLength object. The following example sets the line height of the first paragraph in the active document to 25 pixels.

Dim objPara As IHTMLElement
Dim objSS As IFPStyleState
Dim objSL As IFPStyleLength

Set objPara = ActiveDocument.all.tags("p").Item(0)
Set objSS = Application.ActiveDocument.createStyleState
Set objSL = objSS.createStyleLength

objSL.units = fpLengthUnitsPX
objSL.Value = 25

With objSS
    .gatherFromElement objPara
    .lineHeight = objSL
    .Apply
End With

Properties | text Property | units Property | value Property

Parent Objects | IFPStyleState Object

Child Objects