name Property

Returns or sets a String that represents the name of a bookmark in an HTML document.

expression.name

*expression   * Required. An expression that returns one of the objects in the Applies To list.

Remarks

Bookmarks are A elements with the name attribute and are members of the collection returned by using the anchors property. Hyperlinks are A elements with the href attribute and are members of the collection returned by using the links property.

Example

The following example inserts a bookmark into the active document.

Dim objBookmark As FPHTMLAnchorElement

ActiveDocument.body.insertAdjacentHTML "beforeend", _
    "<a id=""newbookmark"">Bookmark</a>"
    
Set objBookmark = ActiveDocument.anchors.Item("newbookmark")

objBookmark.Name = "newBookmark"

Applies to | FPHTMLAnchorElement Object | FPHTMLButtonElement Object | FPHTMLEmbed Object | FPHTMLFormElement Object | FPHTMLFrameBase Object | FPHTMLFrameElement Object | FPHTMLFrameSetSite Object | FPHTMLIFrame Object | FPHTMLImg Object | FPHTMLInputButtonElement Object | FPHTMLInputFileElement Object | FPHTMLInputHiddenElement Object | FPHTMLInputImage Object | FPHTMLInputTextElement Object | FPHTMLMapElement Object | FPHTMLMetaElement Object | FPHTMLObjectElement Object | FPHTMLSelectElement Object | FPHTMLTemplateRegionElement Object | FPHTMLTextAreaElement Object | FPHTMLWindow2 Object | FPHTMLWindowProxy Object | IHTMLAnchorElement Object | IHTMLButtonElement Object | IHTMLEmbedElement Object | IHTMLFormElement Object | IHTMLFrameBase Object | IHTMLFrameSetElement Object | IHTMLImgElement Object | IHTMLInputButtonElement Object | IHTMLInputFileElement Object | IHTMLInputHiddenElement Object | IHTMLInputImage Object | IHTMLInputTextElement Object | IHTMLMapElement Object | IHTMLMetaElement Object | IHTMLObjectElement Object | IHTMLSelectElement Object | IHTMLTemplateRegionElement Object | IHTMLTextAreaElement Object | IHTMLWindow2 Object