IHTMLLinkElement Object

Microsoft FrontPage Visual Basic

IHTMLLinkElement Object

IHTMLLinkElement IHTMLStyleSheet

Represents a LINK element in an HTML document. The IHTMLLinkElement provides access to a limited number of properties and methods related to the LINK element. For access to all properties and methods, use the FPHTMLLinkElement object.

Using the IHTMLLinkElement object

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

    Dim objLink As IHTMLLinkElement

Set objLink = ActiveDocument.all.tags("link").Item(0)
  

Note  The IHTMLLinkElement object cannot be accessed using the links property. The links property applies to hyperlinks in a document not the LINK element.