Failing One-Click Installs

Posted on 2007-10-03
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
    LVL 8

    Expert Comment

    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
    LVL 46

    Expert Comment

    by:Wayne Taylor (webtubbs)
    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


    LVL 3

    Accepted Solution

    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 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

    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 46

    Expert Comment

    by:Wayne Taylor (webtubbs)

    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

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    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…

    733 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now