This project has moved and is read-only. For the latest updates, please go here.

NetOffice Outlook Add-in

Apr 13, 2015 at 10:56 AM
I'm new to netoffice and a relative novice when it comes to programming (and that has mostly been vba).

I have written quite a bit of vba for outlook which I wanted to share with others in the office. I could just copy the vba from machine to machine, but I decided to look into creating a proper add-in instead! (I like a challenge)

I have therefore downloaded the NetOffice assemblies and #develop.

I used the NetOffice Developer Tools to create the basic add-in code, using the Project Wizard with the following settings -> Automation Addin, VB.NET, Visual Studio 2010 (Express), NET 4.0 (Client Profile), for Outlook, Current User, Load at Startup, only customize ribbon UI selected.

Loaded the solution up in #develop and built using the default settings, and it works like a charm.

As we have multiple users I then realised that it would be better if the add-in was installed for all users. I went through the same process to create the project but selected all users instead. Built in #develop, but this fails to register the addin.

I have tried manually registering the addin using c:\windows\microsoft.NET\Framework\v4.0.30319\regasm (as administrator) which brings up a message box (generated by the addin?) of "An error occured in Register", then regasm reports types registered successfully. This doesn't load in outlook.

The machine i'm running this on is 64bit windows 8, with 32bit office 2013

I've tried this on a virtual machine with a fresh copy of winXP 32bit, and office 2010 with the same results - current user works fine local machine doesn't

As this is a virtually blank project, I can't understand what the problem is. Not sure if is netoffice, #develop, or the machine. I've posted the same question on the #develop forum in case.

Any help would be appreciated - Probably something obvious to someone more experienced!!

Apr 21, 2015 at 11:06 AM
I've checked a few more things and have got it to work under all-users / local machine.

It works if I register with regasm and then manually put the registry entries under

HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Outlook\AddIns on the virtual machine


HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Office\Outlook\AddIns\ on my development machine with 64bit windows + 32 bit office

I've also checked using the same settings but for an excel add-in, which works fine.

Any Ideas?
Apr 22, 2015 at 2:19 PM
let me know your NO version please to clearify the problem.

"An error occured in Register" - its the default error message in NO when a problem comes up in the addin register method, most of the time its a security issue.
You can modify the RegisterErrorHandler method in your addin to show more detailed informations for the error(which is helpful).

Apr 27, 2015 at 3:30 PM
NO version is 1.7.3

I amended the RegisterErrorHandler to try to shed more light on what the error is
Exception.Message = Object reference not set to an instance of an object.
Exception.StackTrace = at NetOffice.OutlookApi.Tools.COMAddin.RegisterFunction(Type type)
Exception.Data = System.Collections.ListDictionaryInternal

I find it strange that an excel addin with the same settings works fine