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


Guest


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: 7233
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