which Event happens after AddinStartUpComplete

Add-in Express™ Support Service
That's what is more important than anything else

which Event happens after AddinStartUpComplete
 
Kapil Kaushik




Posts: 2
Joined: 2009-07-16
Hi All,

I am using AddinExpress 2008 for .Net , professional version for creating toolbar for MS Office. I need some information. As we know that AddinStartupComplete gets called when any MS Office application is opened. In this function , i m trying to publish a customized outlook form into perosonal form library of outlook.

The process of publishing form in AddinStartUpComplete is rstricting us to achieve some functionality. I can not publish form during AddinRegister also because PublishForm opens outlook in between during the installation process and creates problem. This made us to move PublishForm AddinStartupComplete.

Is there any event which happens after AddinStartUpComplete and can help us in knowing that MS Office application like word/excel/outlook has been loaded and opened sucessfully and now goes ofr publishing the form. This will help us in acheiving required functionality.

Please let me the suitable events for publishing form except the AddinRegister and AddinStartupComplete.

I will be grateful to you.

regards
Kapil Kaushik
Posted 16 Jul, 2009 08:47:23 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Hi Kapil,

When the add-in is being loaded, an instance of add-in module is created and the constructor is called (note that the same occurs when your add-in is being registered).

Then Office starts loading the add-in and this generates the AddinInitialize event. When the add-in has been loaded, AddinStartupComplete is generated.

I've created an Outlook add-in containing several System.Diagnostics.Debug.Writeline calls. Then I started DebugView (you can google for it) and started Outlook. Here is what I got:

[896] !!! constructor
[896] !!! AddinModule_AddinInitialize
[896] !!! AddinModule_AddinStartupComplete
[896] !!! adxOutlookEvents_Startup
[896] !!! adxOutlookEvents_ExplorerActivate

Note however, that the user can startr your add-in using the COM add-ins dialog AFTER Outlook was started. I believe you can determine this by checking Explorers.Count and/or ActiveExplorer.

Anyway, you can "create" an event that occurs after AddinStartupComplete. To do this, you call the SendMessage method of your module and filter incoming messages in the OnSendMessage event (of the module). This technique uses the PostMessage Win32 API function which delivers the window message (you specify its identifier in SendMessage) after all other window messages are processed.


Andrei Smolin
Add-in Express Team Leader
Posted 16 Jul, 2009 12:12:58 Top
Kapil Kaushik




Posts: 2
Joined: 2009-07-16
Hi Andrei,

I will implement SendMessage since this will be called after AddinStartupComplete and let you know if it solve my purpose.

regards
Kapil
Posted 16 Jul, 2009 14:25:47 Top