VB.net Outlook 2003 Add-in not loading - Not Loaded. A Runtime error occurred... How can i fix this????

Hi Experts,

I've written a vb.net outlook 2003 add-in in vs2008, but after i installed it on the client machine, it fails to load.
I can see the Add-in in outlook under COM Add-Ins, but it's not active and the error message that goes with it is:

Not loaded. A runtime error occurred during the loading of the COM Add-In.

I've read up SO much on articles suggesting that it's a CAS security problem, but i don't really know where or how to fix this?

Can anyone PLEASE assist me in this??? It's extremely urgent....

Who is Participating?
Kobz46Connect With a Mentor Author Commented:
Figured out what was going wrong...

Apparently Office 2003 and 2007 differs COMPLETELY!

My issue was the following:

For .net framework 2, and outlook 2003, i referenced the outlook.dll 2007 library instead of the 2003 one.
The second issue was that Visual Studio Tools For Office runtime ed needed to be installed for the add-in to work with 2003. This is not needed for 2007.

For anyone else struggling with this, here are a couple of links that made my life SO much easier:

Architecture of Application-Level Add-Ins

Deploying Application-Level Add-Ins (2003 System)

How to Prepare End User Computers to Run Office Solutions (2003 System)

Outlook Add-ins with Visual Studio Tools for Office

Registry Entries for Application-Level Add-Ins

4 things needed to make an Add-In work in outlook 2003:

- Must have the relevant .net framework installed on the client PC
- Must have VS tools for Office runtime installed on the client PC
- You need a basic set of registry keys entered
- You need to configure the CAS (code access security) for .net framework to your add-in permission to load / for the user to access it

This was a REAL pain for me but hope this post will help anyone in the future who needs help...
Christopher KileCommented:
Well, first, you need to establish exactly what runtime error is occuring during the load.  Do you have try-catch logic in the add-in intialization (probably an event called OnLoad or OnInitialize) that will send reports of errors to the application error log?  That would be my first step.
Kobz46Author Commented:
Have you by any chance got sample code (vb.net) of a VERY basic outlook add-in that only displays a menu, and does something stupid like msgbox "hello" when you click on it?
Christopher KileCommented:
No, I do not.
Kobz46Author Commented:
see above comment for solution
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.