Installing Outlook Add-In - windows-7

I have a problem. I've been installing my VSTO Outlook Add-In to the Outlook 2007 on the account that has no security limitations. For the setup, I am using a normal visual studio setup project. I've had the user install few versions of my application before and it worked fine. Recently, I've created a new version of my application (which is installed to HKLM and to HKCU registry (hotfix that allows me to install the add-in to HKLM registry was also installed)). Now the outlook add-in doesn't even load on the user's computer. If you look in Outlook/Trust Center/Add-ins/ you will see my outlook add-in showing up under "Inactive Application Add-ins", but when I try to enable it, I get a message "This add-in is installed for all users on this computer, and can only be connected or disconnected by an administrator" even though I am logged in as administrator. I also looked in the registry and it has LoadBehaviour as 3, which means that it should appear under active add-ins. I tried installing old version, but now it also doesn't work and does not even appear as installed Outlook add-in.
What can be a cause of this problem?
Thank you

I've spent a week on finding a solution and it was so damn simple... the problem was that I've set identical registry settings to HKCU registry and HKLM registry. As a result the registry settings were in conflict, since both HKCU tried to load this add-in and HKLM tried to load this add-in and as a result it didn't allow Outlook Add-In to load at all. As soon as I've got only the HKCU registry setting, my add-in loaded normally. =D

This also happens if you have the InstallAllUsersVisible flag = FALSE in the UI Interface if using an MSI package. Setting it back to the default TRUE fixed this error for me. I had it working using HKCU - but Victor F nailed the source of the issue.

Related

Outlook 2016 Add-In doesn't work for some users

We've created an Outlook add-in which integrates our custom CRM with Outlook. A command button is added to messages in read and compose mode. A function file is called on the button click.
The add-in manifest passes validation and installs properly on all machines. However on Outlook 2016 desktop (only) we are seeing an error on some machines. The exact error message says: “We’re sorry, we couldn’t access [NCS Outlook Add-in]. Make sure you have a network connection. If the problem continues, please try again later.” ([NCS Outlook Add-In] is the name of our add-in.)
Note that this message appears IMMEDIATELY after clicking the add-in command button. It does not first say “[NCS Outlook Add-in] is working on your request” like it add-ins do when an error has occurred.
We have tried Outlook logging and haven't found anything useful in the logs. We've checked settings and disabled other add-ins. We have also tested across machines with user accounts. The same user will have the error on one machine and not the other. In short, it seems that the error is machine specific and not profile related.
Version of Office 365 installed: 1705 (Build 8201.2209).
We experienced this exact behavior in Outlook 2016, the solution was to enable protected mode for the restricted and internet zones.
The easiest way to change this is in IE.
In Internet Explorer, click the Tools button, and then click Internet Options.
Click the Security tab, and then select the Restricted Sites Zone.
Select the Enable Protected Mode check box, and then click OK.
Restart Internet Explorer.
Here is a little more information:
https://support.microsoft.com/en-us/help/2761180/apps-for-office-don-t-start-if-you-disable-protected-mode-for-the-rest
Try this:
1) Close Outlook
2) Rename the folder C:\Users\%USERNAME%\AppData\Local\Microsoft\Outlook
to C:\Users\%USERNAME%\AppData\Local\Microsoft\Outlook.OLD
(Where %USERNAME% is current User Name.)
3) Start Outlook, Setup User Profile
4) Add/Test Add-In.
If that works, then something broken on old Outlook profile. But if same problem: Exit Outlook, delete the Outlook folder and rename Outlook.OLD back to Outlook.
I ran into this exact same problem after uninstalling Visual Studio 2015 on my development machine. (I had been using Visual Studio 2017 for Outlook add-in development.)
The problem went away as soon as I reinstalled Visual Studio 2017. The Outlook 2016 installation had nothing to do with the problem, I never changed Outlook or its profile at all.
This would indicate that the problem is somehow related to the SDK tooling on the machine...perhaps something to do with the .Net framework?
If I ran into this problem on a customer machine I would try reinstalling or repairing the .Net framework, or perhaps reinstalling Outlook (assuming it contains some add-in tooling that is broken.)
Just passing this on in case it helps anyone else.

Unable to register Outlook Add-in no matter what

I've been developing an Outlook Add-in, been working and installing fine.
Then I tried to installed a really old version of the same add-in (trying to verify some old behaviour, the old plugin was for Outlook 2010), and it somehow messed up the install/uninstall process. Ever since then Office Outlook 2016/365 is not able to register/view the Add-in anymore.
I've tried the following:
Uninstall and Reinstall Outlook
Removes all the registry entries related to the Add-in (I literally search with the Add-in's keyword and removed hundreds of left over entries which I wasn't even aware of)
Deleted c:\Users\user\AppData\Local\Microsoft\Office
Deleted c:\Users\user\AppData\Roaming\Microsoft\Office
Deleted c:\Users\user\AppData\Roaming\MyAddIn
Ran CCleaner
Ran RegDllView to scan all the registered DLLs, and it says C:\WINDOWS\system32\mscoree.dll is "missing"? But is there...
Tried to uninstall and reinstall Add-in Express before recompile the whole project.
If i try to manually add the Add-in in Microsoft Outlook, Options > Add-ins > Manage > Add, if i point it to MyAddIn.dll it would say that it is not a valid COM Add-in (but nothing was changed in the project on how the dll was built). If i point it to adxloader.dll and hit OK, it won't complaint but nothing shows under Add-in either.
My next option is to completely reinstall Windows, this is driving me insane. Can anyone who have experienced this insanity give me some pointers?
Operating System: Windows 10
Office: Office 365 Outlook

Outlook Addin starts up inactive

This is a very strange situation that I am in; scratching my head for answers.
I have developed an outlook addin that works perfectly on my dev machine and on about 90 % of the clients machines.
The load behavior of the addin is 3.
On 10% of the users, outlook starts up without loading the addin despite the load behaviour being 3. The user can manually make the addin active by going to the addin manager on outlook but after a restart this addin reverts back to being inactive bbut load behavior never changes from 3.
I used Install Shield LE to package this addin. I don't even know where to debug anymore, I tried changing different load behaviour values but still the same outcome. The addin just won't load on startup with this set of users.
The company uses ZenWorks to automatically install the addin on all the PCs from the MSI i generate using install shield.
One weird thing is, If i go to the installation directory of the addin and install the addin using the .vsto deployment file, it works and gets loaded on outlook (but thats makes it two addins installed).
I also checked the Resiliency section on the registry and the addin isn't there.
I have faced this issue. To solve this, you need to manually delete the registry entries from the following path.
Open registry editor and go to HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\<Your add-in> and change the LoadBehavior to 3.
If the above registry entry is not found, then look for HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Office\Outlook\Addins\<Your add-in> and change the LoadBehavior to 3.
Go to HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Resiliency – remove the REG_BINARY keys found in DisabledItems and CrashingAddinList
where 15.0 is for outlook 2013.
If you are using 2010 outlook, replace 15.0 by 14.0 and for Outlook 2016 replace 15.0 by 16.0
Hope this helps.

Create MSI file from c# outlook addin in VS 2013

I have c# outlook addin created in visual studio 2013.
It has windows forms also.
I am getting mad on generating msi file, any easier solution/steps for me, please ?
Mainly tell me, after completing the process, where do I find the final MSI file (like bin/release folder) ?
I installed this - https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d
as well as installshield limited edition installer.
I was able to build it and ran the installation file(.exe) from disks folder and it is installing but not showing anything in the outlook.
Take a look at the Deploying an Office Solution section in MSDN. It describes two possible options for deploying your Office solution in depth:
Deploying an Office Solution by Using Windows Installer
Deploying an Office Solution by Using ClickOnce
It is up to you which way is to choose.
I was able to build it and ran the installation file(.exe) from disks folder and it is installing but not showing anything in the outlook.
There are multiple reasons why you don't see your add-in in Office applications.
First of all, make sure that you did all the steps described in the previously mentioned articles. Then I'd suggest checking the required windows registry keys for COM add-ins, see Registry Entries for Application-Level Add-Ins for more information.
Microsoft Office applications can disable add-ins that behave unexpectedly. If an application does not load your add-in, the application might have hard disabled or soft disabled your add-in.
Hard disabling can occur when an add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your add-in is executing.
Soft disabling can occur when an add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable an add-in if it throws an unhandled exception while the Startup event handler is executing.
You can read more about that in the How to: Re-enable an Add-in That Has Been Disabled article in MSDN.
Finally, you may also check out the Trust Center settings in Outlook. The Macro Security settings can be applied to add-ins as well. May be it is required to sign the add-in with a digial signature and etc.

Outlook 2003 Add-in not working for all users

I have an Outlook 2003 add-in written in Visual Studio 2008. All it does is display a msgbox when it loads. I am using a setup package to create me an msi for install
I have got the security caspol issue sorted. I have the PIA and the VSTO installed on the client. My setup is set to install for all users.
If I install it on a client machine it creates the HKCU registry hive and works perfectly for the installing user and appears in the COM add-ins dialog but doesnt work for any other user that logs in.
I changed the setup package to put the registry hive in HKLM and now it doesn't work for any user, including the installing user and it does not appear in the COM add-ins dialog.
What am I missing? I've read and re-read so much on the net it's starting to drive me crazy.....
Cheers in advance.
Newer versions of office don't read that HKCU key, Instead, they read this weird composite key under HKCU.
Misha Sneerson has a good article (with updates for 2010) here
http://blogs.msdn.com/b/mshneer/archive/2007/09/04/deploying-your-vsto-add-in-to-all-users-part-i.aspx
Have you remembered to set the "InstallAllUsers" property in the setup project to true? This is pretty much undocumented, and I have just spent the last three days banging my head against exactly the same problem you describe until I noticed that I had overlooked this. Set it to "true" and now my project installas to all users :)
http://the-simple-programmer.blogspot.com/2011/02/deploy-visual-studio-2008-vsto-add-in.html

Resources