Hi
I guess this can be accomplished by writing a new add-in that checks how
Word was started. The ConnectMode parameter that you get from the
OnConnection event will give you this piece of information. Depending on its
value, you can activate/deactivate the other addin. However, as far as I
know, there's no easy way to tell what application launched word. It could
be Outlook or any other application, like IE or similar. This idea is not
enough if the unload necessarily has to be by program. Here's a list of the
values that ConnectMode may have
ext_cm_AfterStartup 0 Add-in was loaded after the application started,
or by setting the Connect property of the corresponding AddIn object to
True.
ext_cm_Startup 1 Add-in was loaded at startup.
ext_cm_External 2 Add-in was loaded externally by another program or
component.
ext_cm_CommandLine 3 Add-in was loaded through the Visual Studio
devenv command line.
ext_cm_Solution 4 The Add-in was loaded when a user loaded a solution
that required the Add-in.
ext_cm_UISetup 5 The Add-in was started for the first time since being
installed.
/ Fredrik