IHTMLHeaderElement Object

Microsoft FrontPage Visual Basic

IHTMLHeaderElement Object

IHTMLHeaderElement

Represents headings in an HTML document. Headings are represented using the H1 through H6 elements. The IHTMLHeaderElement object provides access to a limited number of properties and methods related to H elements. For access to all properties and members, use the FPHTMLHeaderElement object.

Using the IHTMLHeaderElement Object

Use the tags method to return an IHTMLElementCollection collection that represents a collection of all the headings of a specified type in a document. For example, use tags("h1") to return a collection of all H1 elements in a document and use tags("h2") to return a collection of all H2 elements in a document.

Use the Item method to return an IHTMLHeaderElement object that accesses a specific H element, referenced by ordinal number or by the value of the id attribute. The following example accesses the first H1 element in the active document.

    Dim objHeading As FPHTMLHeaderElement

Set objHeading = ActiveDocument.all.tags("h1").Item(0)