Office 2007 PIA needed when Office 2010 is installed? RRS feed

  • Question

  • Hello,

    Can you experts pls. set me on the right track?

    I have developed a VB .NET app (VS 2005) that uses Excel functionality. As my development machine has Office 2007 installed, the project references - amongst others - the Microsoft Excel 12.0 Object Library and the Microsoft Office 12.0 Object Library.

    The application is working fine on my development machine and has been known to work on a few other machines as well. But I am now confronted with a machine (Office 2010 installed) where it crahes upon take-off. By changing the code and post-poning some of the Excel calls around, I have been able to get it to start up, and have narrowed the problem down to the following block of code:

                Dim xlApp As New Excel.Application
            Catch ex As Exception
            End Try
    (with an Imports Excel = Microsoft.Office.Interop.Excel further up)

    The exception that pops up is:


         class factory for component with CLSID (a bunch of numbers) failed due to the following error:

         80040154 at MyApplication.Main.Button1_Click(Object sender, EventArgs e)

    The target machine (Office 2010) only seems to have 14.0 versions of the Excel and Office Object Libraries.

    Should I install the Office 2007 PIA on top of Office 2010? I read somewhere on this forum that Office 2010 is smart enough to redirect the 12.0 references to the 14.0 libraries?

    Or am I looking in the wrong place?


    Any help would be greatly appreciated,


    Friday, May 27, 2011 7:34 AM


All replies