old format or invalid type library

Add-in Express™ Support Service
That's what is more important than anything else

old format or invalid type library
problem accessing HostApplication property 
Kitinon W.




Posts: 10
Joined: 2005-07-04
Hi,

I add a reference to 'Microsoft Excel 11.0 Object Library' which is Microsoft.Office.Interop.Excel.dll in the GAC and try to do the following in VB:
Imports Excel = Microsoft.Office.Interop.Excel

Public Class AddinModule
...
Private Sub MyButton_Click( ... ) Handles MyButton.Click
Dim xlApp as Excel.Application = Me.HostApplication
-> xlApp.Cursor = Excel.XlMousePointer.xlWait
End Sub
End Class

I got the 'old format or invalid type library' exception on the line mark with '->'.
Could you please advise what went wrong here? Thanks.

Kitinon
Posted 05 Jul, 2005 15:41:30 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Kitinon.

As far as I know from previous topics, you use Office XP. If so, you need to install PIAs for Office XP. http://www.microsoft.com/downloads/details.aspx?familyid=c41bd61e-3060-4f71-a6b4-01feba508e52&displaylang=en

The fact is that, the 'Microsoft Excel 11.0 Object Library' is the type library for Microsoft Excel 2003.
Posted 06 Jul, 2005 05:30:35 Top
Kitinon


Guest


Hi Sergey,

You are right. As a matter of fact, this code works without problem on Office XP. I just can't make it works under Office 2003.
Posted 06 Jul, 2005 14:52:29 Top
Kitinon W.




Posts: 10
Joined: 2005-07-04
To give you more info. The XLToys sample gives the same error "Old format or invalid type library" error dialog with "Interop.Excel" on the title bar on my Excel 2003, too.

Kitinon
Posted 06 Jul, 2005 23:34:13 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Kitinon.

I tested our XLToys and all worked fine. Probably you installed both Office XP and Office 2003 on your PC.
When exactly do you get the error message?
Posted 07 Jul, 2005 05:55:45 Top
Kitinon W.




Posts: 10
Joined: 2005-07-04
Hello,

After I uninstall Office 2003 and reinstall it again, the problem goes away. Thanks for your support.

Kitinon
Posted 08 Jul, 2005 02:33:15 Top