Word addin Context Menu how top add the same Controls to two CommandBars

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

Word addin Context Menu how top add the same Controls to two CommandBars
 
Micha? Buk


Guest


I have ADXContextMenu - adxTextContextMenu named "Text" an he has some buttons.
I want to add the same buttons to "Spelling" context menu I do this in AddinInitialize event like that:


for (int i = 0; i < this.adxTextContextMenu.Controls.Count; i++) {
    this.adxSpellingContextMenu.Controls.Add(this.adxTextContextMenu.Controls[i]);
}


But that not work. But why?
Posted 09 May, 2011 04:01:10 Top
Eugene Astafiev


Guest


Hi Micha?,

I have a couple of questions for you:
1. What Office version do you use? What version and build number of Add-in Express do you use?
2. Could you please take a screenshot of the context menu you want to be customized?
Posted 09 May, 2011 05:12:38 Top
Micha? Buk


Guest


Word 2010, Add-in Express 6.4.3056 Standard
In Designer that's looks like this
User added an image
When I click on text (button to Context Menu added in designer) all is ok
User added an image
I see the button with text "Usu? osob?"
But when I click on text with error (Spelling) button not exists.
User added an image
But button is added to this.adxSpellingContextMenu.Controls. I use Property Visible to enable disable buttons.
Posted 09 May, 2011 08:16:11 Top
Eugene Astafiev


Guest


Hi Micha?,

Please use the ADXRibbonContextMenu component for customizing context menus in Office 2010. You can read more about this in the http://www.add-in-express.com/docs/net-first-com-addin.php#context-menu and http://www.add-in-express.com/docs/net-outlook-addins.php#outlook-context-menu sections of the online documentation.
Posted 09 May, 2011 09:02:41 Top
Micha? Buk


Guest


OK I must do that thanks :)
Posted 09 May, 2011 09:06:17 Top
Eugene Astafiev


Guest


Micha?,

Please let me know whether it helps.
Posted 09 May, 2011 09:15:36 Top