IHTMLAnchorElement Object

IHTMLAnchorElement

Represents a bookmark in an HTML document. Bookmarks are represented by A elements that use the name attribute. The IHTMLAnchorElement object provides references to a limited set of properties and methods related to a bookmark in a document. For access to all properties and methods, use the FPHTMLAnchorElement object.

Note   A elements that use the href attribute are hyperlinks. For information about accessing hyperlinks, see the FPHTMLLinkElement and IHTMLLinkElement objects.

Using the IHTMLAnchorElement object

Use the anchors property to return an IHTMLElementCollection object that represents all the bookmarks in a document. Use the Item method to return an IHTMLAnchorElement object that represents a specific bookmark, referenced by ordinal number or by the value of the id attribute. The following example accesses the first bookmark in the active document.

Dim objBookmark As IHTMLAnchorElement

Set objBookmark = ActiveDocument.anchors.Item(0)

Properties | accessKey Property | hash Property | host Property | hostname Property | href Property | Methods Property | mimeType Property | name Property | nameProp Property | onblur Property | onfocus Property | pathname Property | port Property | protocol Property | protocolLong Property | rel Property | rev Property | search Property | tabIndex Property | target Property | urn Property

Methods | blur Method | focus Method

Parent Objects

Child Objects