Deploying VB CAB in VisualStudio 2005/8

chuckg

New member
Joined
Oct 27, 2008
Messages
1
Programming Experience
3-5
I'm trying to write a mail merge tool that will be activated and downloaded from a web page through an activeX control. It should consume data from a webservice (passed through javascript into the control) and create a Word mail merge file.

I think I have a handle on the code, as I've found good examples on this forum and others about how to perform this type of action, but most of the examples have been in VB6, and I only have VS 200x (both versions), which is VB.net. I've been fighting with the IDE for the past week trying to get it to build a working CAB.

Here are the steps I'm taking:
1. Create new VB class library project.
2. Create a public method in the default Class1.vb called doIt() with no content
3. Create a new project of type CAB package
4. Add the output of the VB class lib project to the cab project.
5. Build the VB project
6. Build the CAB project
7. Create a test HTML page with:
- an OBJECT tag, referencing the GUID found in the Assembly Information section of the VB project
- the cab name for codebase
- a button that calls a javascript method that calls the objectId.doIt()
8. drop the html file and the cab file in the same directory in the docroot of apache
9. Load the webpage and click 'install' on the security warning popup
10. Click the button

I always get an error that the object does not support this property or method. I've also tried Object.Class1.doIt(), to no avail.

I know there's got to be something simple that I'm missing here. The docs seem to suggest that it should be just this simple to deploy an app. For some reason the ClickOnce tool is not available for class libraries. I don't want to create a windows app because I want this to be completely behind the scenes for the user (they should just see the Word doc).

Any help would be most appreciated!

VB.NET:
<HTML>
<HEAD>
 <OBJECT ID="AutoWord" 
   CLASSID="CLSID:7c2f1063-2d81-4380-994e-54260deacdf1" 
   CODEBASE="Cab1.CAB#version=1,0,0,0">
 </OBJECT>
 <SCRIPT language="Javascript">
   function handleClick(){
      AutoWord.doIt();
   }
 </SCRIPT>
</HEAD>
<BODY>
 <a href="#" onclick="handleClick();">click here</a>
 </BODY>
</HTML>
 
Back
Top