Adding items in Outlook ContextMenuReadOnlyMailText

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

Adding items in Outlook ContextMenuReadOnlyMailText
 
Jeremy Baynham




Posts: 7
Joined: 2015-05-19
Hi,

Is it possible to add items to this context menu, which appears when you are reading a received mail item and right-click on some text in the email? I can't find it in the ContextMenuNames collection for an ADXRibbonContextMenu.

thanks,

Jeremy
Posted 19 May, 2015 07:28:45 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Jeremy,

Please check section Step 9. Customizing Outlook context menu at https://www.add-in-express.com/docs/net-outlook-addins.php.


Andrei Smolin
Add-in Express Team Leader
Posted 19 May, 2015 07:38:27 Top
Jeremy Baynham




Posts: 7
Joined: 2015-05-19
Hi Andrei,

Those are the instructions I am following, I just can't find that context menu in the list of available options.

thanks,


J
Posted 19 May, 2015 07:47:27 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Jeremy,

You need to have OutlookMailRead on the Ribbons property of the ADXRibbonContextMenu component.


Andrei Smolin
Add-in Express Team Leader
Posted 19 May, 2015 08:06:13 Top
Jeremy Baynham




Posts: 7
Joined: 2015-05-19
Hi,

I have OutlookMailRead set on the Ribbons Property but all I get in ContextMenuNames is this:

User added an image
Posted 19 May, 2015 08:41:56 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
My fault. I should have recognized the request a bit earlier. In the current version you need to add it programmatically.

        public AddinModule()
        {
            Application.EnableVisualStyles();
            InitializeComponent();

            this.adxRibbonContextMenu1.ContextMenuNames.AddRange(new string[] {
            "Outlook.Mail.Read.ContextMenuReadOnlyMailText",
            "Outlook.Explorer.ContextMenuReadOnlyMailText"});
            
           // Please add any initialization code to the AddinInitialize event handler
        }



Andrei Smolin
Add-in Express Team Leader
Posted 19 May, 2015 09:02:11 Top
Jeremy Baynham




Posts: 7
Joined: 2015-05-19
No problem Andrei. You wouldn't have this in VB.net as well please?

Thanks,

J
Posted 19 May, 2015 09:29:00 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
    Public Sub New()
        MyBase.New()

        Application.EnableVisualStyles()

        'This call is required by the Component Designer
        InitializeComponent()

        Me.AdxRibbonContextMenu1.ContextMenuNames.AddRange(New String() {"Outlook.Mail.Read.ContextMenuReadOnlyMailText", "Outlook.Explorer.ContextMenuReadOnlyMailText"})

        'Please add any initialization code to the AddinInitialize event handler

    End Sub



Andrei Smolin
Add-in Express Team Leader
Posted 19 May, 2015 09:46:26 Top