IHTMLLIElement Object

Microsoft FrontPage Visual Basic

IHTMLLIElement Object

IHTMLLIElement

Represents a LI element in an HTML document. The IHTMLLIElement object provides access to a limited number of properties and methods that relate to the LI element. For access to additional properties and methods, use the FPHTMLLIElement object.

Using the IHTMLLIElement Object

Use the tags method to return an IHTMLElementCollection collection that represents a collection of all the LI elements in a document. Use the Item method to return an IHTMLLIElement object that accesses a specific LI element, referenced by ordinal number or by the value of the id attribute. The following example accesses the first LI element in the active document.

    Dim objItem As IHTMLLIElement

Set objItem = ActiveDocument.all.tags("li").Item(0)
  

The following example accesses the first LI element in the first ordered list in the active document.

    Dim objList As IHTMLUListElement
Dim objItem As IHTMLLIElement

Set objList = ActiveDocument.all.tags("ul").Item(0)
Set objItem = objList.all.tags("li").Item(0)