Outlook Addin disappears when Outlook is started minimized (in tray).

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

Outlook Addin disappears when Outlook is started minimized (in tray).
 
StefanL




Posts: 2
Joined: 2015-03-02
Hello,

we have a problem with an Outlook addin in our production environment.
The Addin doesn't work correctly when Outlook is started minimized to tray (with little gear icon).
We created two sample projects (OutlookTestAddin and OutlookAddinTestConsole). Where can i send them to? I can't attach any files to a Topic.

1. Register the OutlookTestAddin
2. Start the console application (Outlook is closed)

The Console App executes following steps:
1 a new Outlook Application is started (minimized to tray with gear symbol, See screenshot 01 )
2 create and display a new MailItem
3. the Outlook addin is visible and works perfect. (See screenshot 02)
4. close the Mail (x and save changes = no)
5. AdxOutlookAppEvent.Quit Event is called??
6. create and display another MailItem
7. => Addin disappeared. Why? Is this because the Addin has lost his Outlook Application even though it is still running? Is this a AddinbExpress-bug or what can we do? (See screenshot 03)
If Outlook is started maximized (Ui is shown), everythink works fine.

Many thanks for your help,
Stefan L.
Posted 02 Mar, 2015 10:59:47 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Stefan,

Please send the projects to the support email address. You can find it in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 03 Mar, 2015 05:22:09 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Stefan,

Thank you for the projects. I've reproduced the issue.

If you start Outlook programmatically, show a modal inspector and close it, Outlook generates the Quit event. I believe this is how Outlook 2010-2013 and probably 2007 are designed. You can do nothing about it. When Add-in Express gets the Quit event, it finds the Fast Shutdown feature is enabled (by default), which means Outlook will not generate the AddinBeginShutdown event, it reacts to this by disposing all add-in components. Accordingly, when you open another modal inspector, there're no Ribbons.

You have two workarounds.
1. You can call explorer.Display. This shows an explorer window and Outlook generates the Quit event only when you close the explorer window.
2. You can add a registry value described in https://www.add-in-express.com/creating-addins-blog/2010/05/04/outlook2010-fast-shutdown/. In this case, Outlook still generates the Quit event after you close the first inspector but Add-in Express disposes the add-in in the AddinBeginShutdown event, which occurs when you close Outlook. BTW, you should add application.Quit in your test console application; otherwise, Outlook hangs on the Processes list of the Task Manager window.


Andrei Smolin
Add-in Express Team Leader
Posted 04 Mar, 2015 06:26:02 Top
StefanL




Posts: 2
Joined: 2015-03-02
Hello Andrei,

many thanks for your help! It works perfect after adding the registry value.

Kind regards,
Stefan L.
Posted 05 Mar, 2015 09:41:10 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
You are welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 05 Mar, 2015 09:50:30 Top