code Property

Microsoft FrontPage Visual Basic

code Property

Returns or sets a String that represents the URL of the file containing the compiled Java class.

expression.code

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

Example

The following example specifies the URL of the Java class file and code type, and assigns an id attribute for the first object in the active document. This example assumes you have at least one OBJECT element in the active document.

    Sub SetJavaCodeURL()
    Dim objJavaCode As FPHTMLObjectElement
    
    Set objJavaCode = ActiveDocument.all.tags("object").Item(0)
    
    With objJavaCode
        .code = "javacode.class"
        .codeType = "ASCII"
        .Id = "Java Code File"
    End With
End Sub