AddIn do not start

H

Hahn, Thomas

Hallo NG!

I write an Addin for Outlook 2002. On the development maschine the addin is
start with outlook.

Now the development is completed and I would deploy the addin to each
clients. For this I have create an Setup, which install the AddIn on the
target machine. All the file and regiytry values are wrote by the setup
correctly.

If I start Outlook the AddIn will not runing. I do not get any errors or
something else

I use
Windows XP SP2 with Outlook 2002

to developing
Visual Studios 2008

Thanks for your answer

TH
 
K

Ken Slovak - [MVP - Outlook]

Did you look in the COM Add-Ins dialog to see if your addin is listed and
checked?

If it's there but not checked does it start up when you check it?

Is it listed in the Disabled Items dialog (Help, About Microsoft Office
Outlook, Disabled Items button)?

Did you make sure to deploy all requirements and pre-requisites such as the
VSTO runtime, any required VSTO language pack, Framework, etc?
 
H

Hahn, Thomas

Hallo Ken,

The Add-In is not listen in the COM Add-Ins dialog. The dialog ist eamty.
So I can not activate my Add-In, because I do not see it.
It is also not in the list of deactived items. -- I can't see my Add-In in
outlook.
The registry values are all right - they are the same about the developer
machine.

I deployed all the needed files (components) The test pc and the developer
pc have the same version of XP and Outlook. The .net framework are
different. on the developer pc is the version 3.5 installed and on the test
pc the version 2. But the Add-In is develop for the .net framework 2.


Thomas
 
K

Ken Slovak - [MVP - Outlook]

An addin developed for Framework 2 shouldn't have any problems with
Framework 3 or 3.5.

If the addin is not listed in the COM Add-Ins dialog then it's one of 2
things. Either it's registered in HKLM and is an admin installation, or it's
not registered at all and therefore will never be started by Outlook.

Look at HKLM\Software\Microsoft\Office\Outlook\Addins and see if your addin
is registered there. Look also at HKCU with the same path and see if it's
registered there. You should see an entry for your addin using the ProgID
you set for your addin in the project.

Under that registry key you should see LoadBehavior, Description,
FriendlyName and CommandLineSafe. If those entries are not there the addin
is not correctly registered as an addin for Outlook.
 
H

Hahn, Thomas

I have installed the Add-In with a user account who have administration
rights.
The installation was finished without any error. In the eventlog is an
entry, that the installation was finished with out any errors.

I have checked the regitry entries. All of the entries can I found on the
named path. But only one entry, the 'CommandLineSafe" entry, I don't find
them in the registry. The commandlinesafe entry is also not on my developer
pc.
 
K

Ken Slovak - [MVP - Outlook]

So where is the addin registered, in HKLM or in HKCU? What value does
LoadBehavior show, is it 3?

Do you have any error logging or other logging in the OnConnection event
handler that would tell you if you are at least getting that event?
 
H

Hahn, Thomas

The add in is registered in HKCU and the LoadBehavior has the value 3.

The first line in the OnConnection event is "MsgBox(Hallo World")". But the
add doesn't show the msgbox..
So the event doesn't fired
 
K

Ken Slovak - [MVP - Outlook]

The only times I've seen that are either if there's a load error when the
addin is loaded and/or if the addin dll isn't registered correctly for COM
(not the addin registration but the class registration of the addin dll). Is
your addin dll set to be vsdrpCOM in the register property of the output of
the dll as shown in the setup project? Does the COM Add-Ins dialog show the
addin at all and if so if you check it do you see a load error from mscorlib
or other source?
 
H

Hahn, Thomas

The register property of the dll is set to 'vsdrpCOM'. The com add-in dialog
dosn't show the add-in at all. So I can't check the add in.

Thomas
 
K

Ken Slovak - [MVP - Outlook]

The only reasons that the COM Add-Ins dialog doesn't show an addin are if
it's not registered or if it's registered for all users in the HKLM hive of
the registry instead of in HKCU (current user). Since you said that the
addin is registered only in HKCU (it's not there at all in HKLM, is it?) the
only thing left is that for whatever reason the addin is not being
registered.

When I say that I mean the class isn't being registered, not the addin
registration at \Software\Microsoft\Office\Outlook\Addins. The registration
I'm talking about is the COM registration in HKCR.

If that's the case then there's something wrong with your installer.
 
H

Hahn, Thomas

The registration of the class under HKCR shows OK. The path is point to the
install folder of my Addin.

I have create a new OL Add-In with only one function "HELLO WORLD", if the
ConnectCompleted. By creating the new add-in project a setup project is also
created. I have create the addin for current user and for all users. But the
problem are the same - the Add-In don't say "Hello World"


Thomas
 
K

Ken Slovak - [MVP - Outlook]

Your installer should only be registering the addin in either HKLM or HKCU,
not both.

I really don't know what to say. If the addin is registered for COM and has
the correct key in either HKCU or HKLM and LoadBehavior is set to 3 then the
only things are COM errors when starting up, Interop errors when loading
your addin, a badly screwed up installer setup or a lack of requirements or
prerequisites on the target machine.

Are you using the correct PIA for your setup? You need to download the
special Outlook 2002 PIA for use, none comes with Office 2002.

I'm not even sure if the Outlook 2002 PIA works with Framework 2.0 at all,
the oldest framework supported by VS 2008. There is no support for Outlook
2002 any more, it's not a current version of Outlook, so I'm just not sure
how to resolve your problems.
 
V

Vidya

Ken,
I am in a similar situation. I have an Outlook 2003 addin developed in VSTO
2005. The addin works fine on most machines but gets disabled sometimes on
others. We install it under HKLM. On one particular machine, even after
changing the loadbehavior back to 3, when Outlook is restarted, it disables
our addin again with LoadBehavior = 2. I have some error logging in
ThisAddin_startup. But that doesnt get called. We also have a catch-all
exception handler in Startup with error logging, nothing happens with that
either, which makes us believe the addin doesn't even get loaded. All
components are installed and registered properly. This user has a couple of
other addins disabled under About -> Disabled Items and ours is not one of
those. The user runs McAfee virusscan. The scanner for email is one of the
disabled items? How do we figure out what the problem is? Any ideas? How do I
find out if the McAfee script stopper is running?

Thanks
Vidya
 

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