add Method

Microsoft FrontPage Visual Basic

add Method

Returns an IHTMLAreaElement that represents an AREA element added to a document.

expression.add(element, before)

expression    Required. An expression that returns an IHTMLAreasCollection collection.

element    Required. Specifies an IHTMLElement object that represents the image MAP element to which to add the AREA element.

before    Optional. Variant. Specifies the index position in the collection where the new element is placed. If no value is given, the method places the element at the end of the collection.

Remarks

Use the createElement method to create the new AREA element, and then use the Add method to add the AREA element to the specified MAP element.

Example

This example creates an AREA element, specifies the shape, size, hyperlink address for the element, and the adds it to the specified document.

    Dim objArea As FPHTMLAreaElement

Set objArea = ActiveDocument.createElement("area")
  
objArea.Shape = "rect"
objArea.coords = "50,50,50,50"
objArea.href = "http://www.microsoft.com/frontpage"
ActiveDocument.all.tags("map").Item(0).areas.Add objArea