views:

677

answers:

2

I'm trying to create a Shared Addin using VS 2008 for Office XP (Excel to be precise). However, after creating the project in Visual studio and changing the references to Office XP (apart from Extensibility which I don't seem to be able to find a copy for office xp) and adding excel.exe to the references as well. I now don't seem to be able to get the addin to install on any computers.

Does anyone have any guides on writing Office XP addins using VS 2008 (Com Addins I might add)?

Does anyone know the reference that I'm meant to have or things prior that I'm meant to have installed on the pc?

I have three test pcs, this one has office xp, 2003 and 2007 on it and I can write an addin using 2003 references that runs on this but no other box. One with just office xp on it but also office xp PIAs installed and .NET and another one just with office xp on.

Any help would be very much appriciated.

A: 

You need the PIAs installed as a prerequisite. Does the addin install at all, or fail at installation? An add-in misbehaving at startup may be banned by the host application (Excel). You can reneable it in the Add-in settings dialog in Excel.

Øyvind Skaar
+1  A: 

I found the problem with this in the end.

The problem came from a KB entry 908002. Unfortunatley, to run the fix you need Visual Studio 2005 and Office 2003 installed otherwise it won't deploy the fix and so I had glossed over this quite a few times. In the end I found an old copy of VS2005 and Office 2003 on a spare machine, installed the fix, created an installer and tried it on a machine with Office XP and everything worked fine.

There are two fixes that are needed for this to work on any machine with Office XP:

extensibilityMSM.msi - installs the extensibility.dll
lockbagRegKey.msi    - adds a fix to a registry key

I couldn't find these to be downloaded seperately from the KB908002 fix but I have copies locally.

After applying these fixes it was easy to use COM Addins like using VSTO and it took me less than an hour to write the actual code. I'm not looking for a way to include these in my MSI installer as prerequesites.

Any questions chuck them in a comment and I'll try and update asap.

PintSizedCat