src Property

Microsoft FrontPage Visual Basic

src Property

Returns or sets a String that represents the source file for a specified object. Corresponds with the src attribute.

expression.src

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

Example

The following example specifies a source file for the first IMG element in the active document and removes the height and width attributes since the new image may have a different height and width.

    Set objImage = ActiveDocument.images.Item(0)

With objImage
    .src = "graphics/chelan.jpg"
    .removeAttribute "height"
    .removeAttribute "width"
End With