To add to what Dave mentioned about disabled addins, one thing you should do
with a shared managed code addin is to provide it with its own AppDomain by
shimming the addin. Otherwise any managed code addins that aren't shimmed
share the same AppDomain and if one crashes or fires an unhandled exception
the chances are that all of them will be disabled by Outlook. Shimming helps
to prevent that.
There's a COM Shim Wizard that you should download that will provide
shimming for a managed code addin. You can download the latest version of
the wizard (2.3.1) from
http://www.microsoft.com/downloads/d...DisplayLang=en
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Cedric" wrote in message
...
Hi Ken!
So now, the script given by Dave tells me the object is created. I didn't
change anything, except maybe simply restarting my PC. And I didn't dream
the
las ttime, as I remember that the upper case "NOT" in the message box made
me
smile.
Anyway, I attempted to strike on both side : i modified my code to display
a
message box before doing anything, and I checked the fusion log. In
details:
* Though I don't use VSTO, my work is based on a VSTO template. Meaning I
have the IDTExtensibility implemented in the connect.designer.vb file, and
the connect method in the Connect class. So I tried putting a Msgbox in
both
the connect method and the previously unchanged OnConnection method. None
of
them appeared. Strange...
* The fusion log is also quite amazing : when I load the COM object using
Dave's script, I have the message box telling me the object is loaded, and
I
can see 4 entries in the fusion log. Now, when I launch Outlook (with
load
behavior = 3), or when I go to the com mgt dialog and start my add-in,
nothing appears in the fusion log, as if there wasn't any attempt to load
the
COM object. Let me mention that I tool care of logging all binds.
My conclusion is that my object is loaded by Dave's script, but for some
reason, not by Outlook. And this is why my message boxes don't appear.
One way to doublecheck this would be to add a few lines of code to Dave's
script to simulate the call made by outlook, I guess by retreiving an
existing instance of outlook and calling the OnConnection... but as I'm a
very absolute beginner newbie apprentice to VBScript, I don't know how to
achieve this.
Then I'd like to investigate further on how Outlook can reject a com
add-in
like that.
One difference with my home PC is the Linked in COM add-in which seems to
be
non-managed (doesn't call mscoee-thingamabob.dll), and is installed on my
work PC where my add-in fails. In case it could interfere, i tried to
uncheck
it in the COM dialog, and then uninstalling it, but none of these actions
changed anything.
Any help much appreciated!
Thanks in advance.
Cedric.