Has anybody tried sharing a menu item?

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

Has anybody tried sharing a menu item?
 
Esteban Astudillo




Posts: 146
Joined: 2006-02-27
Hi there..

With ADX you can create your popup menus at design time. That’s a great feature. But it doesn’t help much in the specific scenario where the requirement is to have the same sub-menu option be available from two different toolbars, for example.

Think about Outlook’s “New” popup menu. It’s available from the main menu under the “File” menu item and in the “Standard” explorer toolbar. I recently added a button to this popup menu and noticed that it was automatically available from both places.

I need to do exactly the same thing. I have two different toolbars and I would like to share between the two a popup menu I created for my plug-in.

The “safe” solution I have today using ADX is that I have to copy the entire object under the new toolbar and manually keep them synchronized when one of them changes (part of the logic of my plug-in). But now that I have a popup menu with more than 25 items I’m doubtful if it’s a good idea to duplicate this amount of controls.

Has anybody here tried before “moving” or “sharing” one menu item between two different toolbars? (With “here” I mean somebody using ADX, of course) ;)

I was told that this in general is a bad idea (all dynamic adjustments to Outlook toolbars), due to Outlook’s instability mainly. But maybe if I limit myself to some obscure constraints that I’m not aware of I may able to make it in a secure way? I hope the question and context is clear.

Thanks in advance for any tips..
Posted 17 May, 2006 14:31:08 Top
Sergey Grischenko


Add-in Express team


Posts: 7235
Joined: 2004-07-05
Hi Esteban.

The fact is that the 'File->New' popup of the Main Outlook menu and 'New' popup of the Standard toolbar share the same Outlook controls.
That is why you see the items in both menus.

As you know, all controls in the MS Office Object Model have unique IDs. In contrast, all custom controls have Id = 1. That means you can't have one instance of a control in both menus. I am afraid you will have to add your controls twice.

Posted 18 May, 2006 09:38:49 Top