Nanom

Hi I have a computer running windows vista home premium. There is only one user, who is an administrator and the user acount control is off.

The following software is installed (looking at programs and features in control panel):

  • Microsoft Office 2003 Primary Interop assemblies
  • Microsoft Office Enterprise 2007
  • Microsoft Office Proffesional Edition 2003 (only excel is installed)
  • Microsoft Visual Studio 2005 Team Edition for Software Developers - ENU (withouth J# language)
  • Microsoft Visual Studio 2005 Tools for the Microsoft Office System - ENU
  • Visual Studio 2005 Tools for Office Second Edition
  • Visual Studio 2005 Tools for Office Second Edition Runtime
  • Microsoft .NET Framework 1.1
  • Microsoft .NET Framework 2.0 (is part of the operating system)
  • Microsoft Visual Studio 2005 Team Edition for Software Developers - ENU Service Pack 1 (kb926601)
  • Update for Microsoft Visual Studio 2005 Tools for the Microsoft Office System - ENU (kb932232)

I make a new Excel add-in in visual studio (below 2003 Add-ins), and write this sinle line of code in the startup after the last automatic line (code VS puts automatically): MessageBox.show("Add-in works");

When I click on debug, excel 2003 opens and nothing appears. If I open Com Add-ins toolbar, my add-in is in the list unclicked and if I click on it the following message appears: "Not Loaded. A runtime error ocurred during the loading of the com add-in".

I checked the regedit and I have the following entries:

Under HKCurrenUser, Software, Microsoft, Office, Excel, Addins, MyAddin:

    • LoadBehaviour = 2 (I tried changing it to 3, and after I open excel it changes to 2 again)
    • CommandLineSafe = 1

Under HKLocalMachine, Software, Microsoft, Office, Excel, Addins: my addin doesn't appear

I have also checked .NET FW 2 configuration and under Runtime Security Policy, user, code group, all code, VSTO Projects, MyAddin has full trust.

Finally I have the same configuration on another machine running windows XP and my addins work ok.

Any help on why this doesn't work would be much appreciated

Thanks



Re: Visual Studio Tools for Office Excel 2003 Add-in does not load on windows vista

Dennis Wallentin

Hi Nanom,

I cannot see that the SP-1 update for Vista is among the items in the list. Visual Studio 2005 Service Pack 1 Update for Windows Vista






Re: Visual Studio Tools for Office Excel 2003 Add-in does not load on windows vista

McLean Schofield - MSFT

Hello,

From the information you've given, it looks like you've deployed an Excel 2003 add-in to a Vista computer and the user has turned off UAC. In this specific scenario, some of the add-in registration keys must be created under HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER. See the following information from the bottom of the Help topic at http://msdn2.microsoft.com/en-us/library/ms269007(VS.80).aspx:

Registry Entries for Microsoft Office 2003 Add-ins on Windows Vista

If you are deploying a Microsoft Office 2003 add-in to a computer that is running Windows Vista, you must create several of the registry keys in a different registry subtree in the following scenarios:

  • The user is running the Microsoft Office 2003 application with a full administrator access token.

    - or -

  • The user has turned off User Account Control (UAC).

In these scenarios, you must create the COM registration keys (that is, all of the keys that are defined under HKEY_CURRENT_USER\Software\Classes) under HKEY_LOCAL_MACHINE\Software\Classes instead. This is because Windows Vista looks for COM registration keys only under HKEY_LOCAL_MACHINE in these scenarios. For information about how to change the registry keys in the default Setup project, see Setup Projects for Application-Level Add-ins.

If you are using the default Setup project in your add-in project to deploy the add-in, instructions for modifying the registry keys created by the Setup project can be found at http://msdn2.microsoft.com/en-us/library/ms268868(VS.80).aspx.

I hope this helps,

McLean Schofield






Re: Visual Studio Tools for Office Excel 2003 Add-in does not load on windows vista

Nanom

Hi, Thanks for the reply.

I read that post about the setup project, and I tried but I did not install the application I just run the debug from Visual Studio and It didn't work.

I think I will have to change the setup, then install the application and then run the debug mode to continue developing the application.

I will try this, and I will tel you how it goes.





Re: Visual Studio Tools for Office Excel 2003 Add-in does not load on windows vista

Nanom

Nanom wrote:

Hi, Thanks for the reply.

I read that post about the setup project, and I tried but I did not install the application I just run the debug from Visual Studio and It didn't work.

I think I will have to change the setup, then install the application and then run the debug mode to continue developing the application.

I will try this, and I will tel you how it goes.

It works, I have some issue about loading a dll and some archives that it is looking in my installation directory and apparently they are not there but it seems to work ok.

thanks everybody





Re: Visual Studio Tools for Office Excel 2003 Add-in does not load on windows vista

Nanom

Something weird happened. This solution seemed to work for the first day. The next day I tried to continue developing, when I opened Excel from de debug in VS my add-in toolbar appeared but It doesn't make any action. When I click on a button it does nothing,but the day before it worked. I checked the registry and the load behavioud of my add-in was 0. I changed it to 3 again and it worked.

Anybody know why this happens I should change the load behavioud everyday I need to work on my add-in

thanks

nano





Re: Visual Studio Tools for Office Excel 2003 Add-in does not load on windows vista

Nanom

Actually I run Excel through VS and it worked only for the first time. The next time it has changed my registry LoadBehavioud value to 0 again. And i have to change it manually.

Any idea

thank nano