IHTMLLegendElement Object
Represents a LEGEND element for a FIELDSET element in an HTML document. The FPHTMLLegendElement provides access to a limited number of properties and methods related to the LEGEND element. For access to all properties and methods, use the FPHTMLLegendElement object.
Using the IHTMLLegendElement Object
Use the tags method to return an IHTMLElementCollection collection that represents a collection of all the LEGEND elements in a document. Use the Item method to return an IHTMLLegendElement object that accesses a specific LEGEND element, referenced by ordinal number or by the value of the id attribute. The following example accesses the first LEGEND element in the active document.
Dim objLegend As IHTMLLegendElement
Set objLegend = ActiveDocument.all.tags("legend").Item(0)