listStyleImage Property

Microsoft FrontPage Visual Basic

listStyleImage Property

Returns or sets a String that represents the image to use as a bullet in an unordered list.

expression.listStyleImage

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

Remarks

String that specifies one of the following values:

Value Description
none No image is specified.
url(strURL) Location of the image, where strURL is an absolute or relative URL.

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