Outlook add-in won't start

M

Marc Seguin

I created an Outlook add-in and I'm having problems on some computers where
the add-in doesn't start in Outlook. I just checked today on one computer
where this is happening and found that in Outlook the add-in was showing in
the COM Add-In Manager but the check box beside it was unchecked. I check it
off and restarted Outlook but the add-in still didn't start. When I went
back into the add-in manager the add-in was still listed but the check box
was unchecked again. The only way I was able to get my add-in to start up
again was to remove it from the add-in manager and then add it back in.
Does anyone know why this would happen and how it can be fixed without
having to go into the add-in manager? This isn't something I wan't to have
to get my users to do to fix the problem.

Any help would be appreciated.

Cheers,
Marc
 
A

anthony

This happended on my Outlook 2003 COM add-in too. What I have done to
resolve it is go to Help - About dialog of the Outlook 2003. Then I enable
back the add in the disabled items.
 
K

Ken Slovak - [MVP - Outlook]

There usually is a reason that an addin has been disabled however, and if
that isn't fixed then the addin would continue to be disabled. Often the
reason is as simple as not handling all errors in the addin. At minimum an
On Error Resume Next statement should be used. Unhandled errors in a COM
addin will crash Outlook.
 
M

Marc Seguin

Thanks for the help. I found the button on the about screen in Outlook XP
and Outlook 2003 but not in Outlook 2000. If Outlook 2000 disables the
add-in with it just get unchecked in the com add-in manager in the Outlook
options?

90% of my code has error checking that pops up a dialog with error info
(error number, description, line number, etc) but there are a few functions
mainly on startup and shut down that I will need to add the error handling
in. This must be where the errors are being produced that are causing the
add-in to get disabled.

Cheers,
Marc
 
K

Ken Slovak - [MVP - Outlook]

Only Outlook 2002 and 2003 have that Disabled Items group. What happens is
if an addin is disabled a reg key is created and a hash of the addin is
added as a value to that key. So just checking an addin in the COM Add-Ins
dialog won't enable it. Another thing disabling it does is change the
LoadBehavior value to 2 instead of 3. Then when you enable it Outlook checks
and if it's listed as disabled it won't change LoadBehavior or re-enable it.

In Outlook 2000 you can re-enable the addin in the dialog and it will run.
There is no registry list of disabled addins in Outlook 2000.

There are other things that can crash Outlook and cause that. Another is if
the user is running a script stopper that hooks into the Office A-V API and
your code gets an Outlook object using CreateObject in a property page
(OCX). That crashes the script stopper in your program and your code gets
blamed. The fix for that is to use PropertyPageSite.Application to get the
Outlook object. Similarly in the DLL you should always be using the
Application object passed in On_Connection and not creating any Outlook
objects. All Outlook objects should be derived from that Application object.
Of course for a trusted COM addin you have to do that anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top