border Property

Microsoft FrontPage Visual Basic

Returns or sets a String that represents the border style for the specified object.

expression.border

expression    Required. An expression that returns one of the above objects.

Remarks

The String value for the border property can be one or more of the following space-delimited values:

width Any of the values available to the borderWidth property.
style Any of the values available to the borderStyle property.
color Any of the values available to the borderColor property.

Showborder property as it applies to the FPHTMLFrameBase, FPHTMLFrameElement, FPHTMLFrameSetSite, FPHTMLIFrame, FPHTMLImg, FPHTMLInputImage, FPHTMLTable, IHTMLFrameBase, IHTMLFrameSetElement, IHTMLImgElement, IHTMLInputImage, and IHTMLTable objects.

Returns or sets a Variant that represents the width of the object's border in pixels.

expression.border

expression    Required. An expression that returns one of the above objects.

Remarks

Setting the border property to zero causes no border to be displayed.

Example

ShowAs it applies to the FPHTMLStyle and IHTMLStyle objects.

The following example inserts an opening and closing <P> tag to the active document before the closing BODY element, and then formats the paragraph to include a thick, red, dashed border.

Sub SetParagraphBorderProperties()
    Dim objPara As FPHTMLParaElement
    
    ActiveDocument.body.insertAdjacentHTML where:="beforeend", _
        HTML:="<p id=""newparagraph""></p>"
    
    Set objPara = ActiveDocument.body.all.tags("p").Item("newparagraph")

    objPara.Style.Border = "thick red dashed"
End Sub

ShowAs it applies to the FPHTMLImg object.

The following example inserts an image at the end of the active document and sets the width of the image border to 10 pixels. This example assumes that you have an image named "venglobe.gif" in a folder named "images." If you do not, replace the path and file name with an image you do have.

Sub SetImageBorderProperties()
    Dim objImage As FPHTMLImg

    ActiveDocument.body.insertAdjacentHTML where:="beforeend", _
        HTML:="<img src=""images/venglobe.gif"" id=""venus"">"

    Set objImage = ActiveDocument.body.all.tags("img").Item("venus")

    objImage.Border = "10"
End Sub