Show ADXOlFormsCollectionItem only when compose in InlineResponse

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

Show ADXOlFormsCollectionItem only when compose in InlineResponse
 
Thorsten Dreiner




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

I would like to show a ADXOlFormsCollectionItem only when I am using the InlineResponse in the explorer. Not in read mode, only in compose.

I've tried:

Private Sub AdxOutlookAppEvents_ExplorerInlineResponseEx(sender As Object, itemObject As Object, sourceObject As Object) Handles AdxOutlookAppEvents.ExplorerInlineResponseEx
Dim explorer As Outlook.Explorer = TryCast(sourceObject, Outlook.Explorer)
If Not IsNothing(explorer) Then
Me.AdxOlFormsCollectionItem_FromReadingPane.Enabled = True
Me.AdxOlFormsCollectionItem_FromReadingPane.ApplyTo(explorer)
End If
End Sub

This works for the first time, I click on reply, but after that, all items show the form in read mode, too.

Thx. Thorsten

After a few investigations, I think, the problem is a little bit complexer.
I try to show a ComboBox in a form, in which the customer could select a information to this mail. This works fine in a new inspector. I could select the combo in each inspector without changing the other open inspectors. As far as I understood, every new inspector instances a new form, or?

But this combo should be shown, when I compose a new mail in InlineReponse. As I understood, there is only one instance of the form in every explorer window, or? So how could I reach the goal to get a new instance for every mail I compose in InlineResponse?
Posted 13 Mar, 2017 10:50:28 Top
Andrei Smolin


Add-in Express team


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

1. Create a boolean flag, set it to false, and write ADXOlForm.Visible={flag} is in the ADXOlForm.ADXBeforeFormShow event.

2. When you receive the ExplorerInlineResponse event, set the flag to true, and call ADXOlForm.Show() to show the pane. When you receive the ExplorerInlineResponseClose event, set the flag to false and call ADXOlForm.Hide() to hide the pane.

Thorsten Dreiner writes:
I could select the combo in each inspector without changing the other open inspectors. As far as I understood, every new inspector instances a new form, or?


Yes, correct. Move your controls from the pane to a UserControl, create a new instance of the UserControl in the ADXOlForm.ADXBeforeFormShow event, and put the instance on the pane (delete the previous instance from the pane first).

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 14 Mar, 2017 05:52:05 Top
Thorsten Dreiner




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

thanks for your answer. I'll try my best. Is there a possibility to get a new instance of a form for each object in an exploerer and not only for each explorer folder?

I have a problem with my combo box, when I have two or more open InlineResponses open at the same time and I change the combo, the combo is changed in the other panes, too.
Posted 14 Mar, 2017 09:46:24 Top
Andrei Smolin


Add-in Express team


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

This is impossible. Look into creating a new UserControl instance and using it.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 14 Mar, 2017 09:52:43 Top
Thorsten Dreiner




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

is it possible to create an own instance of the usercontrol within the event "ADXSelectionChange" instead of "ADXBeforeFormShow"? Than I could create an instance of the usercontrol for each entry in an explorer.
Posted 14 Mar, 2017 09:57:32 Top
Andrei Smolin


Add-in Express team


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

No, this isn't possible.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Mar, 2017 05:38:22 Top