Visual Basic Concepts
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:
- Create an HTML page that will be used to download the ActiveX document.
- In an existing HTML page from your application or Web site, create a link to the page you just created.
- 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.
- 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
Use the Package and Deployment Wizard if you want to deploy ActiveX documents in Internet Explorer 4.x. Using the wizard, you have several advantages:
- You no longer need a separate HTML page to launch your download.
- You can now mail the URL to the .vbd file and users can select it to view the ActiveX document in the browser.
- The browser can automatically download the latest version of the ActiveX document if it is not installed on the user's machine.