clip Property

Microsoft FrontPage Visual Basic

clip Property

Returns or sets a String that represents which part of a positioned object is visible.

expression.clip

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

Remarks

The String for the clip property can be one of the following values:

auto Exposes entire object. Default value.
rect(top right bottom left) Specifies top, right, bottom, and left Integer values, any of which may be replaced by auto, leaving that side unclipped.

Example

The following example inserts an image into the active document, and then sets the clip property of the Style attribute for the new image.

    Sub ClipImage()
    Dim objImage As FPHTMLImg

    ActiveDocument.body.insertAdjacentHTML "afterbegin", _
        "<img src=""chelan.jpg"" style=""position:absolute"">"
        
    Set objImage = ActiveDocument.body.all.tags("img").Item(0)

    objImage.Style.clip = "rect(auto 100 50 auto)"
End Sub