listStyleType Property
Returns or sets a String that represents the type of bullet that is displayed for an ordered or unordered list.
expression.listStyleType
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
The String value for the listStyleType property can be one of the following:
Value | Description |
---|---|
disc | Displays solid circles. Default. |
circle | Displays outlined circles. |
square | Displays solid squares. |
decimal | Displays Arabic numerals; 1, 2, 3, 4, and so on. |
lower-roman | Displays lower case Roman numerals; i, ii, iii, iv, and so on. |
upper-roman | Displays upper case Roman numerals; I, II, III, IV, and so on. |
lower-alpha | Displays lower case Latin alphabet; a, b, c, d, and so on. |
upper-alpha | Displays upper case Latin alphabet; A, B, C, D, and so on. |
none | Displays no marker. |
Note If you specify a value for the listStyleImage and the listStyleType properties, the listStyleImage property takes precedence when a page is displayed in a browser, unless the specified image can't be found, in which case the list would display as specified in the listStyleType property.
Example
The following example inserts an unordered list into the active document before the currently selected element, and then specifies an image to display for the bullet, specifies that the bullet is displayed even with the wrapped lines, and then specifies that if the image file cannot be found that a circle bullet displays in its place.
Sub SetBulletedListProperties()
Dim objList As FPHTMLUListElement
Dim strList As String
strList = "<ul id=""newlist""><li>item1</li>" & _
"<li>item2</li><li>item3</li><li>item4</li></ul>"
ActiveDocument.activeElement.insertAdjacentHTML _
where:="beforebegin", HTML:=strList
Set objList = ActiveDocument.all.tags("ul").Item("newlist")
With objList.Style
.listStyleImage = "sqbullet.gif"
.listStylePosition = "inside"
.listStyleType = "circle"
End With
End Sub