Can 2 Separate Add-Ins Add to the same custom ribbon?

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

Can 2 Separate Add-Ins Add to the same custom ribbon?
 
Mark De Lorenzo




Posts: 40
Joined: 2015-06-22
If I have already successfully written an Add-In that creates a company tab (ACME) with a ribbon group (UTILITIES).

Now I've been asked to create an additional button to add to ACME / UTILITIES. Normally, I'd simply open my existing solution and add the button.

But...

They have put the requirement on me that this needs to be a completely separate installer (Add-In). But the button needs to be visible in the existing ACME / UTILITIES ribbon group.

Can this be done?
Posted 18 Jul, 2018 08:50:11 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Mark,

Please check section Sharing Ribbon controls across multiple add-ins at https://www.add-in-express.com/docs/net-ribbon-components.php#sharing-ribbon-controls.


Andrei Smolin
Add-in Express Team Leader
Posted 18 Jul, 2018 09:32:48 Top
Mark De Lorenzo




Posts: 40
Joined: 2015-06-22
Thank you very much for the link. I downloaded and tested the examples. Works perfectly.

I'm working in VB.Net.

I can follow the directions where...

The first add-in's Tab ID needs to have a desired ID and Shared = True.
The first add-in's Group needs to have a set ID and Shared = True.
The second add-in's Tab ID needs to be the same as the first add-in's Tab ID. And also set to Shared.
The second add-in's Group ID needs to be the same as the first add-in's Group ID. And also set to Shared.

But it's the first part of the documentation that I'm not understanding. Not sure where to make these changes.

You start with assigning the same string value to the AddinModule.Namespace property of every add-in that will share your controls. This makes Add-in Express add two xmlns attributes to the customUI tag in the resulting XML markup:
Posted 18 Jul, 2018 10:25:49 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Mark,

To find how this or that change influences the Ribbon XML: see e.Xml when in the OnRibbonBeforeLoad event handler. The above fragment tries to say that setting the Namespace property to a non-empty string causes the markup to change in the way described.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Jul, 2018 00:28:49 Top
Mark De Lorenzo




Posts: 40
Joined: 2015-06-22
In Visual Studio VB.Net, how do I do ...
I started with setting the AddinModule.Namespace properties of the two add-in modules to the same string value
Posted 19 Jul, 2018 06:33:15 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Start two instances of Visual Studio. In each of them: open a project, click the designer surface of the add-in module, see the Properties window.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Jul, 2018 06:37:00 Top
Mark De Lorenzo




Posts: 40
Joined: 2015-06-22
Found it... Previously, I was clicking the Ribbon object... not the designer surface. Thank you for your impeccable patience.
Posted 19 Jul, 2018 07:24:44 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
No problem at all!


Andrei Smolin
Add-in Express Team Leader
Posted 19 Jul, 2018 07:32:24 Top