Weird behavior when processing inline reply

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

Weird behavior when processing inline reply
 
Velja Radenkovic




Posts: 39
Joined: 2010-12-23
Hello,

I am trying to connect ADXOutlookItemEvents to item in adxRibbonCommand1_OnAction and to process reply event. It is almost working. The part that doesnt work is cursor position in inline reply window which is on the beginning of first letter and it is missing reply info. Please see this screen recording: http://screencast.com/t/yaz1DL06

Minimal test case is here: https://dl.dropboxusercontent.com/u/81180836/InlineReplyMinTestCase.zip .

If you remove the line
inspector = (response as Outlook.MailItem).GetInspector; 

from OutlookItemEventsClassEx.ProcessReply it works OK but I need inspector to get item from it and connect events to be able to process sending event of inline item

I hope it makes sense. Screen recording should help.

I got exactly same result when tried to connect from selection change.


private void adxOutlookAppEvents1_ExplorerSelectionChange(object sender, object explorer)
        {
            Outlook.Selection selection = (explorer as Outlook.Explorer).Selection;
            ConnectToSelectedItem(selection, "adxRibbonCommand1_OnAction");
            Marshal.ReleaseComObject(selection);
            
        }


Outlook 2016 x86 with updates turned on.
(As for the urgency :) I have 30+ people torturing support and its question of time when the rest will start complaining)
Posted 29 Jun, 2016 06:41:14 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Velja,

Velja Radenkovic writes:
I need inspector to get item from it and connect events to be able to process sending event of inline item


Instead of getting the item via the Inspector object, get the item form the ActiveInlineResponse property, see https://msdn.microsoft.com/en-us/library/office/jj231535(v=office.15).aspx.

Velja Radenkovic writes:
I got exactly same result when tried to connect from selection change.


You connect to the selected item; not to the item opened in the inline response editor.


Andrei Smolin
Add-in Express Team Leader
Posted 29 Jun, 2016 09:47:50 Top
Velja Radenkovic




Posts: 39
Joined: 2010-12-23
ActiveInlineResponse is the property from explorer object which is not easily available in ProcessReply(). Are you suggesting that I should Use Selection change to connect to item events using Explorer.ActiveInlineResponse ?

Regarding 2nd comment: "You connect to the selected item; not to the item opened in the inline response editor. "

Yes I connect to selected item to be able to process its Reply event and in reply event I connect to the item opened in Inline editor.
Posted 29 Jun, 2016 10:11:51 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Velja Radenkovic writes:
Yes I connect to selected item to be able to process its Reply event and in reply event I connect to the item opened in Inline editor.


You can wait for the InlineResponse event to fire and then get the item.


Andrei Smolin
Add-in Express Team Leader
Posted 29 Jun, 2016 11:39:19 Top
Velja Radenkovic




Posts: 39
Joined: 2010-12-23
Thanks. I got there. It appears to be working.

I was using InlineResponse event earlier and connected item directly to events and that worked in this add in in the past.
At some point it stopped working with object separated from RCW exception for unknown reason. That's what made me go the longer way.

Thanks once again Anderi
Posted 29 Jun, 2016 14:09:43 Top
Andrei Smolin


Add-in Express team


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


Andrei Smolin
Add-in Express Team Leader
Posted 30 Jun, 2016 01:27:01 Top