Handling "RecallThisMessage" action

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

Handling "RecallThisMessage" action
 
Peter Norman


Guest


Hello,

I'm developing an Outlook Add-In (for 2007 through 2016) with an event handler that handles attempts to recall a message (i.e., click the "Recall This Message" button in the backstage of a mailitem inspector). To do this, I've added an ADXBuiltInControl component, specified the button ID (which I understand is 2511) and created an event handler to handle the ActionEx event. However, when I try running the add-in, the event doesn't fire upon recalling a message. Initial testing was on Outlook 2010.

Is my approach correct? Any thoughts on how to get it to work?
Posted 21 Apr, 2016 17:03:01 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hell Peter,

You need to use the ADXRibbonCommand component with its IdMso property set to "RecallThisMessage". ADXRibbonCommand is used with the Ribbon UI; ADXBuiltInControl is used with the CommandBar UI only.


Andrei Smolin
Add-in Express Team Leader‎
Posted 22 Apr, 2016 04:15:13 Top
Peter Norman


Guest


Many thanks, Andrei. I should have mentioned that before trying the ADXBuiltInControl approach, I actually did try creating an ADXRibbonCommand component for RecallThisMessage, handling both the OnAction and PropertyChanging events. This approach didn't seem to work (the events didn't fire) even though other ADXRibbonCommands in the same add-in did work, so I moved on the ADXBuiltinControl approach. What I'm trying to do with the code is very simple (for now) -- I just want to increment a variable:

        private void adxRibbonCommandRecall_OnAction(object sender, IRibbonControl control, bool pressed, ADXCancelEventArgs e)
        {
            recallEmails++;
        }

        private void adxRibbonCommandRecall_PropertyChanging(object sender, ADXRibbonPropertyChangingEventArgs e)
        {
            recallEmails++;
        }


Any additional thoughts? I note that I've assigned the Ribbon type OutlookMailRead to the ADXRibbonCommand component.
Posted 22 Apr, 2016 07:27:01 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
You can create a test button with the same Ribbons property to check if it shows in the same Outlook window(s) in which you want your RibbonCommand to work.


Andrei Smolin
Add-in Express Team Leader
Posted 22 Apr, 2016 08:00:06 Top