Answered by:
Ribbon group not showing in ribbon tab

Question
-
Hi All,
I am using word addin ribbon. I have one custom tab on that. I want to add ribbon group dynamically. In fact I have added the ribbon group to the tab dynamically. But it is not showing .
Is there any way to achieve this.
Dipu
Monday, July 18, 2011 6:58 AM
Answers
-
Hi Dipu,
You can, but only before the ribbon is loaded. That is, you can do your validations or checks or retrieve the ribbon buttons from a given source and customize the Ribbon, BUT only before the Ribbon is loaded by Office.
For instance, in this project a button is created for each emoticon, in runtime: http://rugicon.codeplex.com/
Regards,
Mauro
twitter.com/mcastagnasso | castagnasso.wordpress.com | If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".- Proposed as answer by Mauro Castagnasso Wednesday, July 20, 2011 8:58 PM
- Marked as answer by 许阳(无锡) Thursday, August 4, 2011 2:51 AM
Monday, July 18, 2011 1:29 PM
All replies
-
Hi Dipu
The answer is pretty much the same as for your other question. No, it's not possible to add (or remove) groups from a Ribbon at run-time. The same goes for tabs FWIW. These things have to be defined at design time, but they can be not visible (or unenabled) by default and made visible / enabled dynamically.
Cindy Meister, VSTO/Word MVPMonday, July 18, 2011 9:22 AM -
Hi Dipu,
You can, but only before the ribbon is loaded. That is, you can do your validations or checks or retrieve the ribbon buttons from a given source and customize the Ribbon, BUT only before the Ribbon is loaded by Office.
For instance, in this project a button is created for each emoticon, in runtime: http://rugicon.codeplex.com/
Regards,
Mauro
twitter.com/mcastagnasso | castagnasso.wordpress.com | If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".- Proposed as answer by Mauro Castagnasso Wednesday, July 20, 2011 8:58 PM
- Marked as answer by 许阳(无锡) Thursday, August 4, 2011 2:51 AM
Monday, July 18, 2011 1:29 PM -
Can we reload the ribbon when the document openings or startup of addin.?? Its urgent can any one help your reply is appreciated.....Monday, July 25, 2011 11:29 AM
-
There's no way to reload Ribbon. Instead, you can show/hide pre-created custom Ribbon controls.
Regards from Belarus (GMT + 2),
Andrei Smolin
Add-in Express Team LeaderMonday, July 25, 2011 11:34 AM -
Hi Mukunda_a,
Thanks for posting in the MSDN Forum.
I think you are able to try InitializeComponent method if you use RibbonDesigner in Visual Studio to reload Ribbon or use this.ribbon.Invalidate if you use Ribbon Xml in Visual Studio to reload your ribbon.
If I have misunderstood anything, please feel free to let me know.
Have a good day,
Tom
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Tuesday, July 26, 2011 7:04 AM