Question

I have a .NET add in for Outlook that I am trying to ensure works correctly in Outlook 2013. The main problems with the add in when used with Outlook 2013 are limited to the UI.

The add in creates a custom PST that is references as a location in the outlook tree view. When a user right clicks on a folder that resides within the PST, I need to hide or disable a number of the context menu options.

I am currently able to do this for most of the options I need to hide by using the GetVisible attribute for the item on the Ribbon.xml file, and then writing a custom handler to determine if the menu option should be shown.

The only menu item I cannot hide in this way is "New Folder". The code for this menu option is the same as for buttons such as Rename Folder and Copy Folder, however Outlook 2013 doesn't seem to look at the return value from the handler and will always display the New Folder option.

I have tried the same code in Outlook 2010 to hide or disable or hide the button and it works fine, it just seems to be that 2013 does not want to play ball.

Was it helpful?

Solution

The problem with this is that the 'New Folder' option I was wanting to remove from the context menu in 2013 has a different ID to 2010.

Once I got the ID, which is "NewInLineFolder" I was able to successfully hide the New Folder option.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top