ADXBeforeFormShow do not fire every time

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

ADXBeforeFormShow do not fire every time
 
Thorsten Dreiner




Posts: 19
Joined: 2009-05-26
Hi team,

I have a custom form which works good. But if I open an item, sometimes the custom form is not shown. Than I click several times again on the item and after some tries, it opens again with the custom form. Also the event ADXBeforeFormShow do not fire than.

Private Sub frmFrom_ADXBeforeFormShow() Handles Me.ADXBeforeFormShow
If Not IsNothing(Me.InspectorObj) Then
Dim _inspector As Outlook.Inspector = TryCast(Me.InspectorObj, Outlook.Inspector)
If Not IsNothing(_inspector) AndAlso Not IsNothing(_inspector.CurrentItem) Then
Me.ucFrom_Read.UpdateStatus(_inspector.CurrentItem)
Marshal.ReleaseComObject(_inspector)
End If
Exit Sub
End If
UpdateMe()
End Sub
Posted 22 Mar, 2017 14:53:30 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hi Thorsten,

Thank you for the code sample, it was very helpful.

As far as I can see you release the COM object that requires the Add-in Express code to work correctly:
Marshal.ReleaseComObject(_inspector)

The point is that your _inspector variable contains the same object as the Me.InspectorObj property. Please try to correct your code and test it.
Posted 23 Mar, 2017 04:49:55 Top
Thorsten Dreiner




Posts: 19
Joined: 2009-05-26
Hi Dmitry,

I've changed it, but it is the same behaviour.


Private Sub frmFrom_ADXBeforeFormShow() Handles Me.ADXBeforeFormShow
If Not IsNothing(Me.InspectorObj) Then
Dim _inspector As Outlook.Inspector = TryCast(Me.InspectorObj, Outlook.Inspector)
If Not IsNothing(_inspector) AndAlso Not IsNothing(_inspector.CurrentItem) Then
Me.ucFrom_Read.UpdateStatus(_inspector.CurrentItem)
'Marshal.ReleaseComObject(_inspector)
End If
Exit Sub
End If
UpdateMe()
End Sub
Posted 23 Mar, 2017 06:08:22 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hi Thorsten,

Okay, let's try to comment out the whole code in this event handler. How does it work in this case?
Posted 23 Mar, 2017 06:15:14 Top
Thorsten Dreiner




Posts: 19
Joined: 2009-05-26
Hi Dmitry,

I've tried it without any code, but it is the same behaviour. It seems to be a problem only with meetingitems. I've attached a link to a video. It shows, that sometimes, the form (yellow text on the top of the inspector) is not shown. Than I have to click again and again and than it is there again.

https://netyard.sharefile.com/d-s00be183c8d44d5db

Thx. Thorsten
Posted 23 Mar, 2017 14:36:41 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hi Thorsten,

Thank you for the video, I see what happens but don't have an explanation at the moment.

I have just created a small add-in for Outlook with the TopSubpane Advanced region and tested it against my Outlook 2016 32-bit. Everything works fine on my side. May I send my add-in to you for testing? Please let me know.
Posted 24 Mar, 2017 07:47:18 Top
Thorsten Dreiner




Posts: 19
Joined: 2009-05-26
Sure. Send it.
Posted 24 Mar, 2017 10:43:15 Top
Dmitry Kostochko


Add-in Express team


Posts: 2731
Joined: 2004-04-05
Hi Thorsten,

I have just sent an email for you. Please check you inbox.
Posted 24 Mar, 2017 11:28:37 Top
Thorsten Dreiner




Posts: 19
Joined: 2009-05-26
HI, same with your Addin
Posted 24 Mar, 2017 12:08:04 Top
Andrei Smolin


Add-in Express team


Posts: 14138
Joined: 2006-05-11
Hello Thorsten,

What Outlook build do you have?

What Add-in Express build do you use?

Check if the issue goes away if you turn off all other COM add-ins.

In the video, we see you have a program installed; the program shows its controls in the top right corner of Outlook windows. Does the issue persist if you turn off that program?

Also, we don't have access to that video any longer. Could you please make the video available for us?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Mar, 2017 07:14:47 Top