-->

Outlook 2007 Add-In, LoadBehavior changing to 0

2019-04-07 17:46发布

问题:

I'm developing an add-in for Outlook 2007 (VSTO 4.0, .Net 4.0). Whenever I install on the target machine using an msi all registry settings are correctly set and I can see the add-in listed under the installed add-ins. However, it is listed under inactive and whenever I go to manage the com add-ins and check the box to enable it, it does not stay checked.

I checked the registry setting and the load behavior has changed from 3 to 0, so I close outlook, change it back to 3 and start outlook again. Once again it changes from 3 to 0.

  • I'm installing the add-in for all users so the registry is under HKEY_LOCAL_MACHINE
  • I have the hotfix for office 2007 to be able to install for all users under HKEY_LOCAL_MACHINE
  • The add-in is not listed under the "Disabled Items"
  • The Load Behavior is switching from 3 to 0 ( not 2 ) so there are no messages regarding runtime errors
  • I've turned on fusion logging but there are no errors showing there either
  • I've put logging statements in the startup event but they are not being called which leads me to think the add-in is not even being called so it may be a configuration issue.

I've gone through this article: Deploying your VSTO add-ins to All Users (Saurabh Bhatia) and the msdn doc referenced in it several times now and can't figure out where I'm going wrong.

Any help debugging this issue further, or even better, a solution to this issue, would be greatly appreciated.

回答1:

I've had similar issue. Install Outlook 2007 Service Pack 2 as well as this hotfix http://support.microsoft.com/kb/976477

Also make sure you have HKLM\SOFTWARE\Microsoft\Office\12.0\Common\General\EnableLocalMachineVSTO = 1

For more info visit: http://support.microsoft.com/kb/976811



回答2:

When I installed Outlook Add-In in client's machine which contains Outlook 2007, our outlook Add-In didn't get enabled. We searched a lot. Finally we concluded as this is not a issue with Outlook Add-In.

Outlook Add-In needs the following in Outlook 2007:

  • Microsoft Office Service Pack to Service Pack 2 along with Hot fix
  • Microsoft Office Service Pack to Service Pack 3

Installed Microsoft Office Service Pack to Service Pack 2 along with Hot fix or above versions of Service Pack.

Please find the Service Pack 2 Hot fix link below  http://support.microsoft.com/kb/976477