listStyle Property
Returns or sets a String that represents the setting for a liststyle attribute for an inline style.
expression.listStyle
*expression * Required. An expression that returns one of the objects in the Applies To list.
Remarks
The String value for the listStyle property can be a space-delimited list of up to three of the following, in any order:
Value | Description |
---|---|
type |
Any of the range of type values available to the listStyleType property. |
position |
Any of the range of position values available to the listStylePosition property. |
image |
Any of the range of image values available to the listStyleImage property. |
Example
The following example inserts an ordered list into the active document and sets the list style properties to show an uppercase Roman numeral so that wrapped lines are not even with the number.
Sub SetOrderedListProperties()
Dim objList As FPHTMLOListElement
Dim strList As String
strList = "<ol id=""neworderedlist""><li>item1</li>" & _
"<li>item2</li><li>item3</li><li>item4</li></ol>"
ActiveDocument.activeElement.insertAdjacentHTML _
where:="afterbegin", HTML:=strList
Set objList = ActiveDocument.all.tags("ol").Item _
("neworderedlist")
objList.Style.listStyle = "upper-roman outside"
End Sub
Applies to | FPHTMLStyle Object | IHTMLRuleStyle Object | IHTMLStyle Object