How to create a 2nd Tab on the Ribbon After the 1st Tab?

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

How to create a 2nd Tab on the Ribbon After the 1st Tab?
 
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hi,

I tried to search your site for an answer, but it seems the search facility is not working at the moment:
Sorry, some problem has occurred. Please try again later.


I am working on a test Excel add-in.

I created a tab called MyTab1, and placed it after the Insert Tab in the Excel Menu.
I set InsertAfterIdMso to TabInsert in Properties.
This works fine.
The Id of MyTab1 is: adxRibbonTab_b185620f4d5a41a6a2b1f54773ee675b

----

Now, I created another tab called MyTab2, and want to position it just after MyTab1.
Its Id is: adxRibbonTab_356a5ea701c648eda72320e527bf948c
I set InsertAfterId to: adxRibbonTab_b185620f4d5a41a6a2b1f54773ee675b (Copy/Paste)


I rebuild, register & debug

On debug, I get this error message:

Custom UI Runtime Error
Error found in CustomUI XML of ...
.
.
.
Unknown Office Control ID: adxRibbonTab_b185620f4d5a41a6a2b1f54773ee675b


Grateful if you could tell me what I am doing wrong.

Thanks
Leon
Posted 26 Apr, 2019 01:48:22 Top
Andrei Smolin


Add-in Express team


Posts: 16744
Joined: 2006-05-11
Hello Leon,

You have two ways:
1. Set MyTab2.InsertAfterIdMso = "TabInsert"
2.
2.1 Set the Namespace property of the add-in module's designer surface to a string value e.g. "someString".
2.2 Set MyTab2.InsertAfterId="default:adxRibbonTab_356a5ea701c648eda72320e527bf948c".

Find an explanation to these manipulations in section "Sharing Ribbon Controls across Multiple Add-ins" at https://www.add-in-express.com/docs/net-ribbon-components.php#sharing-ribbon-controls.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Apr, 2019 07:54:21 Top
Leon Lai Kan




Posts: 200
Joined: 2018-12-20
Hi, Andrei

Thanks for your reply.

I tried your 2nd solution "someString".

It works nice! My problem solved!

Best Regards,
Leon
Posted 26 Apr, 2019 08:39:10 Top
Andrei Smolin


Add-in Express team


Posts: 16744
Joined: 2006-05-11
Great!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Apr, 2019 09:45:35 Top