Failing One-Click Installs

Posted on 2007-10-03
Medium Priority
Last Modified: 2013-11-26
Ive written an application using Visual Basic 2005 and Visual Studio 2005.

The application needs to be used on some PCs with Office 2003 and some PCs without Office installed.

Since I have a form in the application where the individual needs to enter a narrative into a text box, I want to allow those with Word to be able to spell check the text theyve entered. My program works great on PCs with Office installed. But when the users without Office try to install the program, they get an error. The error box says, Unable to install or run the application. The application requires that assembly Microsoft.Vbe.Interop Version be installed in the Global Assembly Cache (GAC) first. Please contact your system administrator.

I dont have the licenses available to install Microsoft Office on all my PCs. Some users just dont need it or we have specific reasons for them not to have it. I also dont have the budget to purchase licenses for an independent spell checker plug in. On my form, I make the spell check button visible or hide it depending on the registry key for Word.

How can I get the program to install without Office and still allow those with Word to be able to use the Word spell checker?
Question by:DanVial

Expert Comment

ID: 20017867
Instead of adding a reference to Microsoft.Vbe.Interop to your application you will need use reflection to load the assembly and access the classes you want. This means your application is late binding to the the office assembly.

To get you started you'll need to load the assemble, see http://msdn2.microsoft.com/en-us/library/system.reflection.assembly.load.aspx
LVL 48

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 20019805
Hi DanVial,

Instead of adding a reference to MS Word, use late binding. So Instead of something like this....

    Dim wdApp As New Word.Application

...use something like this....

    Dim wdApp As Object
        wdApp = CreateObject("Word.Application")
    Catch ex As Exception
        MsgBox("Word is not installed on the computer")
        Exi Sub
    End Try



Accepted Solution

ScottParker earned 2000 total points
ID: 20025141
I just had this problem myself and fixed it by following these steps..

Step 1.
Install 'O2003PIA' from the 'Office 2003 PIA redistributable'  from Microsoft.

Step 2.
go to http://support.microsoft.com/kb/908002 and Download and install the VS2005-KB908002-ENU-x86.EXE package .
then follow these steps.
1. In Solution Explorer, right-click the solution Setup project, and then click Properties.
2. Click Prerequisites.
3. Click to select the Shared Add-in Support Update for the Microsoft .NET Framework 2.0 (KB908002) check box.

Author Comment

ID: 20025376
I selected ScottParker's answer as the best one. The other two didn't work because the error kept coming back during the installation phase before the program had a chance to run. Using the redistributable from Microsoft fixed my problem.

Thanks Scott

LVL 48

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 20026267

The reason you were still getting that error on installation with my suggestion was because you still had a reference to MS Office. Removing that would have fixed the problem.


Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month15 days, 18 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question