Manually Deploying ActiveX Documents

The process for deploying ActiveX documents manually differs depending on whether you are deploying for Internet Explorer 3.x or 4.x.

Deploying ActiveX Documents in Internet Explorer 3.x

You perform these steps to deploy an ActiveX document manually in Internet Explorer 3.x:

  1. Create an HTML page that will be used to download the ActiveX document.

  2. In an existing HTML page from your application or Web site, create a link to the page you just created.

  3. In the HTML page used to download the ActiveX document, use the OBJECT tag to provide a means for the browser to download, register, and navigate to the ActiveX document.

    Note   See "Manually Deploying ActiveX Controls" for an example of the object tag.

  4. In the download page, insert VBScript that instructs Internet Explorer to navigate immediately to the ActiveX document through its .vbd file. The following code shows an example:
    <HTML> 
    <OBJECT ID="SampleDoc1" 
    CLASSID="CLSID:11111111-1111-1111-1111-111111111111" CODEBASE="Project1.CAB#version=1,0,0,0"> 
    </OBJECT> 
    <SCRIPT LANGUAGE="VBScript"> 
    Sub Window_OnLoad 
    Location.Href = "SampleDoc1.VBD" 
    End Sub 
    </SCRIPT> 
    </HTML>
    

    In this code fragment, only the name of the .vbd file is given, rather than a fully qualified path. Internet Explorer looks for it in the same directory as the .htm file containing the VBScript.

Downloading ActiveX Documents in Internet Explorer 4.x

If you want to manually set up an ActiveX document for deployment on systems using Internet Explorer 4.0 or later, you can use a tool called the CodeBase Fixup Utility. CodeBase Fixup Utility is a tool that adds codebase information to a .vbd file or other ActiveX documents. The code information specifies the version number of the ActiveX document and the URL of the server used to download it. This approach presents several advantages:

The Package and Deployment Wizard automatically configures your ActiveX documents using the CodeBase Fixup Utility. If you are using the wizard to package your components for download, you do not need to perform this procedure.

For More Information   For instructions on how to use the CodeBase Fixup Utility tool, see the Readme.txt file installed with the tool in the Tools directory, or on the Visual Basic owner's Web site at http://www.microsoft.com/vstudio.