Learn how to a build a cloud-first strategyRegister Now


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

Posted on 2008-11-14
Medium Priority
Last Modified: 2013-11-08
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....

Question by:Kobz46
  • 3
  • 2
LVL 23

Expert Comment

by:Christopher Kile
ID: 22959342
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.

Author Comment

ID: 22973491
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?
LVL 23

Expert Comment

by:Christopher Kile
ID: 22976304
No, I do not.

Accepted Solution

Kobz46 earned 0 total points
ID: 22992078
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...

Author Comment

ID: 22992089
see above comment for solution

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question