Add RibbonGroup to the Tab of another plugin

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

Add RibbonGroup to the Tab of another plugin
 
Jeroen Koolen




Posts: 5
Joined: 2016-02-18
Hello,

I would like to add a RibbonGroup to the Tab of another PlugIn.
I know the namespace of the other addin and the idQ of the tab.

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"
xmlns:QDS="dStyle.Word">
<tab idQ="QDS:DOCT" >

I tried using the same name space for my add-in express project but where can i specify the idQ within my project?

I looked at https://www.add-in-express.com/docs/net-ribbon-components.php#sharing-ribbon-controls but can't get it to work.

Regards,

Jeroen Koolen
Posted 18 Feb, 2016 06:08:57 Top
Andrei Smolin


Add-in Express team


Posts: 16313
Joined: 2006-05-11
Hello Jeroen,

See Sharing Ribbon controls across multiple add-ins.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Feb, 2016 06:25:20 Top
Jeroen Koolen




Posts: 5
Joined: 2016-02-18
Hello Andrei,

Thats the same article as I metioned in my post :-)
I understand the principle of it, but where can I add the iDQ.
Can I edit the XML files directly? I am using VB.net

Gr. Jeroen
Posted 18 Feb, 2016 06:32:59 Top
Andrei Smolin


Add-in Express team


Posts: 16313
Joined: 2006-05-11
That article provides a link for an example. You get the XML in the OnRibbonBeforeLoad event of the add-in module; see e.Xml.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Feb, 2016 06:44:40 Top
Jeroen Koolen




Posts: 5
Joined: 2016-02-18
Hello Andrei,

My apologies for the late response. I was away for a couple of days.

The "e.XML" suggestion wasn't totally clear to me, but with tis keyword I found this Thread: https://www.add-in-express.com/forum/read.php?FID=5&TID=11331
I rewrote the code for VB.Net and got it working!

It looks like I can't combine the "OnRibbonBeforeLoad" with the Ribbons I created using the graphical designer.
I only get the Ribbon I hard coded in XML and not all the other ones. Is there a way to combine them? Or is it possible to get the XML-output of the graphical designer so I can include in in the "e.XML"?

Regards,

Jeroen Koolen
Posted 23 Feb, 2016 00:55:13 Top
Andrei Smolin


Add-in Express team


Posts: 16313
Joined: 2006-05-11
Hello Jeroen,

The OnRibbonBeforeLoad event after Add-in Express generates the Ribbon XML using the settings of the Ribbon controls from the add-in module; the event occurs before that Ribbon XML is supplied to Office.

You can parse the XML generated and modify it as required. Merging XMLs is not supported.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Feb, 2016 03:34:53 Top
Jeroen Koolen




Posts: 5
Joined: 2016-02-18
Hello Andrei,

So I have to add the full XML to the "e.XML" variable.
How can I parse the XML generated by the graphical designer?
When I search my VB.Net project folder I can't find any XML files.

Regards,

Jeroen Koolen
Posted 23 Feb, 2016 03:48:46 Top
Andrei Smolin


Add-in Express team


Posts: 16313
Joined: 2006-05-11
When the event occurs, e.Xml contains the Ribbon XML generated by Add-in Express.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Feb, 2016 03:55:06 Top
Jeroen Koolen




Posts: 5
Joined: 2016-02-18
Hello Andrei,

That's Why I couldn't find it :-)
I put a break-point in the code of the OnRibbonBeforeLoad and added a watch to e.XML
The XML value is visible now.

I tried changing the idQ value using e.XML = Replace(e.XML, "idMso=""TabHome""", "idQ=""QDS:DOCT""")
The text string is replaced correctly, but after the modification the buttons aren't displayed anymore.

I entered the entire string in e.XML via a string an discovered that the following code causes the problem: onload=""ribbonLoaded_Callback""

When I also remove this code it work fine.

Thanks for all the help.

Regards,

Jeroen Koolen
Posted 23 Feb, 2016 16:27:00 Top
Andrei Smolin


Add-in Express team


Posts: 16313
Joined: 2006-05-11
You are welcome!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Feb, 2016 03:51:51 Top