Adding different ribbon context menus to different Explorer views

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

Adding different ribbon context menus to different Explorer views
I cannot work out how to display different context menus in different explorer views 
Andrew Lockwood


Guest


Hello Andrew,

That was my fault; I'm sorry for this. Here's another version of it:

http://temp.add-in-express.com/support/VclOutlookaddin1-AndrewLockwood2.zip


Andrei Smolin
Add-in Express Team Leader


I have been a bit busy recently and haven't had much time to play around with this. However, whilst I can see that your example works, I cannot work out what is different about it to my code.

Are you able to explain to me the steps involved and / or which are the critical properties that need to be set to allow this to work?
Posted 19 May, 2020 03:50:47 Top
Andrei Smolin


Add-in Express team


Posts: 18806
Joined: 2006-05-11
Hello Andrew,

The project I sent you doesn't contain any code. You can comment out all code in your real add-in project to check if this changes the behavior.

In my case, I drop a TadxRibbonContextMenu onto the add-in module, specify the name(s) of context menu(s) to be modified, set the Ribbons (and Ribbon2010) properties, and use the Controls property to specify the controls to show in the specified context menu(s).

To get context menu name(s) to use, I install the .NET based add-in that we describe at https://www.add-in-express.com/creating-addins-blog/2015/04/15/creating-office-context-menu-addin/. A citation from that page:

The add-in adds a Ribbon button to all context menus in Excel, Outlook, PowerPoint, Project, Publisher, Visio and Word from Office 2010-2013. The button caption is set to the name of the context menu showing the button. Clicking the button puts the following info to the Clipboard: 1) context menu name, 2) context object type name.


When that add-in is installed, I open a context menu of interest and click that button. Thus I get the context menu name. If the context object type is of interest, I use this info in code.

As to the Ribbons (and Ribbon2010) properties, they should be in sync with the context menu name(s) as a context menus may be shown in a set of Ribbons only. I suggest that you select the "Show add-in user interface errors" checkbox; see e.g. https://docs.microsoft.com/en-us/visualstudio/vsto/how-to-show-add-in-user-interface-errors?view=vs-2019.

There's nothing else.


Andrei Smolin
Add-in Express Team Leader
Posted 19 May, 2020 07:22:45 Top
Andrew Lockwood


Guest


Thanks. I will have a look when I get a chance.
Posted 28 May, 2020 04:36:07 Top