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




Posts: 5
Joined: 2011-02-02
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


Add-in Express team


Posts: 8540
Joined: 2007-07-25
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?
.NET, Extended MAPI, Windows Phone & RT
Posted 09 May, 2011 05:12:38 Top
Michał Buk




Posts: 5
Joined: 2011-02-02
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


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Michał,

Please use the ADXRibbonContextMenu component for customizing context menus in Office 2010. You can read more about this in the Step 8. Customizing context menus and Step 9. Customizing Outlook context menu sections of the online documentation.
.NET, Extended MAPI, Windows Phone & RT
Posted 09 May, 2011 09:02:41 Top
Michał Buk




Posts: 5
Joined: 2011-02-02
OK I must do that thanks :)
Posted 09 May, 2011 09:06:17 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Michał,

Please let me know whether it helps.
.NET, Extended MAPI, Windows Phone & RT
Posted 09 May, 2011 09:15:36 Top