View Single Post
  #5  
Old January 9th 09, 02:36 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Sorting of plug-ins

I'd probably just use one addin and do any sequencing of code operations as
desired in that one addin.

If you must have 2 or more addins you can initially set the ones that should
be loaded in order to have a LoadBehavior value of 2 in the registry. That
will prevent them from loading when Outlook starts. An addin that starts
normally would then do something like this when it wants to start the other
addins where olApp is your Outlook.Application object:

Dim oAddin As Office.COMAddIn
Set oAddin = olApp.COMAddIns("MyFirstAddin")
oAddin.Connect = True

That will start that addin. You can repeat for the other one with that one's
name.

To shut them down you'd use similar code but set Connect to False.

--
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


"khai" wrote in message
...
Is it possible to write a wrapper plug-in to wrap the 2 plug-ins, and
therefore sequence the order in which these plug-ins are executed?

"khai" wrote:

What should I do then, if I have 2 plug-ins, but would like one to run
before
another?

Do I have to combine these 2 plug-ins as one?


Ads