Problem with ADXRibbonContextMenu in Outlook 2010

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

Problem with ADXRibbonContextMenu in Outlook 2010
 
Marcel Mrozinski




Posts: 12
Joined: 2019-10-28
Hi,
we use an ADXRibbonContextMenu in our add-in, which has only 'OutlookMailCompose' under the 'Ribbons' property. The menu has an ADXRibbonMenuSeparator and an ADXRibbonCheckBox. In Outlook 2013 and later versions the context menu is displayed correctly, but in Outlook 2010 it is missing. Do you have any idea what could be the reason for this?

With best regards,
Marcel Mrozinski
Posted 27 May, 2021 05:37:37 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Hello Marcel,

Could you provide the settings of the involved components? Find the settings in the InitializeComponent method called from the constructor of the add-in module.

I'll create a project basing on this info and test it in these Outlook versions.


Andrei Smolin
Add-in Express Team Leader
Posted 27 May, 2021 05:52:28 Top
Marcel Mrozinski




Posts: 12
Joined: 2019-10-28
Hi Andrei,
here is the code:

Private Sub InitializeComponent()
    Me.components = New System.ComponentModel.Container()
    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AddinModule))
    Me.rcmAttachments = New AddinExpress.MSO.ADXRibbonContextMenu(Me.components)
    Me.rcmSep1 = New AddinExpress.MSO.ADXRibbonMenuSeparator(Me.components)
    Me.rcbUpdateAttachment = New AddinExpress.MSO.ADXRibbonCheckBox(Me.components)
    '
    'rcmAttachments
    '
    Me.rcmAttachments.Controls.Add(Me.rcmSep1)
    Me.rcmAttachments.Controls.Add(Me.rcbUpdateAttachment)
    Me.rcmAttachments.Ribbons = AddinExpress.MSO.ADXRibbons.msrOutlookMailCompose
    '
    'rcmSep1
    '
    Me.rcmSep1.Id = "rcmSep1"
    Me.rcmSep1.Ribbons = AddinExpress.MSO.ADXRibbons.msrOutlookMailCompose
    '
    'rcbUpdateAttachment
    '
    resources.ApplyResources(Me.rcbUpdateAttachment, "rcbUpdateAttachment")
    Me.rcbUpdateAttachment.Id = "rcbUpdateAttachment"
    Me.rcbUpdateAttachment.Ribbons = AddinExpress.MSO.ADXRibbons.msrOutlookMailCompose
    '
    'AddinModule
    '
    resources.ApplyResources(Me, "$this")
    Me.Namespace = "AddIns"
    Me.SupportedApps = AddinExpress.MSO.ADXOfficeHostApp.ohaOutlook

  End Sub


With best regards,
Marcel Mrozinski
Posted 27 May, 2021 05:56:55 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Hello Marcel,

rcmAttachments should specify context menu names. If you set these names somewhere in your code, please provide the names for me to use.


Andrei Smolin
Add-in Express Team Leader
Posted 27 May, 2021 07:24:43 Top
Marcel Mrozinski




Posts: 12
Joined: 2019-10-28
Hi Andrei,

there is no context menu set in the code and in Visual Studio in Designer I can't select a value. I can only select a value if I select an additional ribbon item (like OutlookExplorer).

With best regards,
Marcel Mrozinski
Posted 27 May, 2021 07:30:06 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
That means the msrOutlookMailCompose doesn't have *Outlook* context menus (it does have Word context menus though).

If there're no context menu names, the Ribbon controls shouldn't be created at all.


Andrei Smolin
Add-in Express Team Leader
Posted 27 May, 2021 08:05:21 Top
Marcel Mrozinski




Posts: 12
Joined: 2019-10-28
Hi Andrei,

You've led me in the right direction - when you already don't know your own code... I have now checked everything again and we do indeed set the ContextMenu property in the code:

rcmAttachments.ContextMenuNames.Add("Outlook.Mail.Compose.ContextMenuAttachments")


If I see this correctly, this context menu is not available in Outlook 2010 and thus the error is explained.

Please excuse the confusion and thanks for the help!

With best regards,
Marcel Mrozinski
Posted 27 May, 2021 08:33:07 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Thank you, Marcel! No problem at all.


Andrei Smolin
Add-in Express Team Leader
Posted 27 May, 2021 08:36:22 Top