Add-in not loading on ribbon in Office 2007

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

Add-in not loading on ribbon in Office 2007
 
Tom Brearley




Posts: 2
Joined: 2016-09-05
Dear Support

We have several add-ins which are working fine in Office 2010/2013 and 2016.
However, we have just tried to load our Add-In in Excel/PPT 2007, and the add-in does not appear on the ribbon.
The software installs to the correct location, and the add-in appears in the registry (with load behaviour set to 3), however on starting Excel, the add-in will not appear on the ribbon.

I have looked into this matter, and I am aware that Office 2007 transitions from the commandbar to the ribbon UI, however I understand from other posts on the forum that Excel and PPT 2007 do use the ribbon interface, and thus I cant see why the add-in should not load.

Can you please assist with this issue? We are rolling out our product to multiple clients, and thus would urgently appreciate your help.

If convenient I can give you my contact telephone number to discuss this in more detail.

Kind regards

Tom Brearley
Posted 05 Sep, 2016 07:03:23 Top
Andrei Smolin


Add-in Express team


Posts: 18816
Joined: 2006-05-11
Hello Tom,

Please reinstall your add-in, start Excel or PowerPoint, make sure the add-in isn't loaded, and send me copies of these files to the support email address ():

-{My Documents}\Add-in Express\adxregistrator.log in the profile of the user who runs the installer
-{My Documents}\Add-in Express\adxloader.log in the profile of the user who starts Excel or PowerPoint


Andrei Smolin
Add-in Express Team Leader
Posted 05 Sep, 2016 09:39:31 Top
Andrei Smolin


Add-in Express team


Posts: 18816
Joined: 2006-05-11
You can find the support email address in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Sep, 2016 09:40:17 Top
Andrei Smolin


Add-in Express team


Posts: 18816
Joined: 2006-05-11
Hello Tom,

Thank you for sending us the log files. The adxloder.log shows that the issue is caused by the minOfficeVersionSupported attribute, see adxloader.dll.manifest in the Loader folder of your add-in project. This value was assigned after you chose Office 2010 as the minimum supported version while creating the add-in project. Note that in addition to this, interops for Office 2010 were copied to the Interops folder within your project's folder. If you need to let your add-in load in version 2007, close Visual Studio, set the minOfficeVersionSupported attribute to 12, replace the files in the Interops folder with the corresponding files from {Add-in Express}\Redistributables\Interop Assemblies\Office 2007, start Visual Studio and register your project.

Also note that Microsoft doesn't recommend and Add-in Express may not support having several Office versions installed on the machine. Issues that you encounter in such environment may not be solvable programmatically. Please find more details at https://support.microsoft.com/en-us/kb/290576.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Sep, 2016 05:17:27 Top
Tom Brearley




Posts: 2
Joined: 2016-09-05
Hello Andrei

Thank you very much for your reply.

I am about to start attempting the fix. However, quite a lot of our code base relies on features in the Excel Interop Libraries which enable dynamic types (i.e. ones post 2010 I believe). Therefore if I use the 2007 Interop libraries I am encountering a lot of errors in the codebase.

Further to this - can I get away with just changing the minimum supported version, and not the libraries? Do both parts of the fix have to be actioned for this to work?

Many thanks

Tom
Posted 07 Sep, 2016 05:32:57 Top
Andrei Smolin


Add-in Express team


Posts: 18816
Joined: 2006-05-11
Hello Tom,

Actually, you can use any interop version with any Excel version; there's no restriction here. You should be aware however that using a method available in an interop and missing in the host application will cause an exception crashing the host; see the third screenshot in https://www.add-in-express.com/creating-addins-blog/2010/03/16/interop-assemblies-late-binding/.

In any way, you need to use an IF to bypass such a call in Office 2007.

Here's how you can do this in a bit different fashion.

Temporarily replace Office 2010 interops with interops for 2007. Compile the project. Every method/property missing in interops for Office 2007 generates a compile-time error. For each of such calls, write the following construction:

 if ({an addin module reference e.g. this}.HostMajorVersion < 14) {
     // here's a call to the method/property missing in Office 2007
}


After all such methods are wrapped in such IFs, you restore references to Office 2010 interop assemblies and test your add-in in Office 2007.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Sep, 2016 06:23:00 Top