codeBase Property

Microsoft FrontPage Visual Basic

codeBase Property

Returns or sets a String that represents the URL of the specified Web component.

expression.codeBase

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

Remarks

The String for the codeBase property can be appended with #Version=a,b,c,d, which indicates the version of the component. Version values (a,b,c,d) are indicated below. If the client computer has a newer version installed, no download occurs.

a High-order word of the major version of the component available at the specified URL.
b Low-order word of the major version of the component available at the specified URL.
c High-order word of the minor version of the component available at the specified URL.
d Low-order word of the minor version of the component available at the specified URL.

Example

The following example inserts an OBJECT element into the active document and then modifies the values for the id, width, height, and codeBase properties.

    Sub SetObject()
    Dim objObject As FPHTMLObjectElement
    
    ActiveDocument.body.innerHTML = "<object id=""newobject""></object>"
    
    Set objObject = ActiveDocument.all.tags("object") _
        .Item("newobject")
    
    With objObject
        .Id = "CommonDialog1"
        .Width = "32"
        .Height = "32"
        .codeBase = "http://activex.microsoft.com/controls/" & _
             "vb5/comdlg32.cab#Version=1,0,0,0"
    End With
End Sub