Outlook 2010: Contextmenu on Item (TadxContextMenu) does not work

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

Outlook 2010: Contextmenu on Item (TadxContextMenu) does not work
Control in Contextmenu (TadxContextMenu) is not showed when open the contextmenu on an email item. 
Ilir Berisha


Guest


MS Office Prof Plus 2010, Version: 14.0.5128.5000 (32-Bit)
Add-in Express 2008 for VCL, Least Version 4.4 (Build 412)

I used the Contextmenu for an email item in the email list in office 2003 before and now i have installed office 2010 and in the contextmenu my control does not appear.

I also added a message box command in the event OnBeforeAddControls, but no message box appear.

What should I do to get the control in the contextmenu?
Posted 08 Feb, 2011 05:34:55 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Ilir,

Please try to set the UseForRibbon property of your TadxContextMenu component to True in the OnAddInInitialize event handler.
Posted 08 Feb, 2011 08:52:20 Top
Ilir Berisha


Guest


Hi Dmitry,

Thanks for the reply. The Property 'UseForRibbon' doesn't exists on TadxContextMenu. I have tried it and get an error.
Posted 10 Feb, 2011 04:57:49 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Ilir,

Oh, sorry, in Add-in Express 2008 version this property is declared as protected in the TadxCustomCommandBar class. Please try to use the following code to get access to the protected property:


type
  TadxCustomCommandBarAccess = class(TadxCustomCommandBar);

procedure TAddInModule.adxCOMAddInModuleAddInInitialize(Sender: TObject);
begin
  TadxCustomCommandBarAccess(adxContextMenu1).UseForRibbon := True;
end;
Posted 10 Feb, 2011 12:59:23 Top
Ilir Berisha


Guest


Hi Dmitry,

I have tried your example, but it has no effect. I have also declared the property UseForRibbon as public in class TadxCustomCommandBar and try it again. It doesnt work.

The control is not showed in the contextmenu and the event OnBeforeAddControls on TadxContextMenu does not start.

If it needs some small changes in adxAddin.pas to fix it, i can do it. Thanks for your help.
Posted 11 Feb, 2011 04:09:52 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Ilir,

I think you can have a look at the ReconnectControls method of the TadxCustomCommandBar class.

Please note, Add-in Express 2008 does not support Office 2010 applications, we added support for Office 2010 32-bit in Add-in Express 2010 and now we support only the two most recent versions of Add-in Express - 2010 and 2009.
Posted 11 Feb, 2011 07:07:39 Top