Excel Backstage - how can I add inbuilt groups to a custom tab

I am developing  a dictator style application in Excel. For that I am completely replacing the backstage. I want to be able to use the standard 'Print' tab (and the preview part of it). I need to however position this tab where I like in backstage. Since there is no way to re-order in-built tabs I have created my own and was going to use the print tab's groups. I can however not get this to work. Whilst the RibbonX passes as valid syntax against the schema it does not show anything in the tab.

I have attached a test file with example RibbonX. To give an idea what I want I have positioned my print tab between two other tabs 'Alpha' and 'Beta'.

If someone could tell me how to do this or achieve the same result then I would be very grateful.
Who is Participating?
BitsqueezerConnect With a Mentor Commented:

I only wanted to see the XML in your sample as I was not able to extract that at that point of time.

In the meantime I was able to experiment a while with the backstage ribbon of Excel 2010 and found out that it is indeed not possible to do what you want to do.

Here is a MS page about backstage ribbons:
Introduction to the Office 2010 Backstage View for Developers

On this page there is a FAQ which says:
Can I specify where to add a tab?
    You can specify whether a custom tab is displayed before or after an existing tab.

Can I reorder existing tabs?
    You cannot re-order existing tabs. You may only specify the relative order of tabs by inserting a tab before or after another tab.

Can I modify the column layout of existing tabs?
    You cannot change the column layouts of any existing tab that you did not create.

Where can I add groups?
    You can add a new group to any column of an existing tab. You can also specify whether the new group is displayed before or after an existing group. One restriction is that you cannot add more groups to tabs which contain a taskFormGroup such as the Share tab.

Can I reorder existing groups?
    You cannot reorder existing groups. You can only specify relative orders for new groups that you create.

I understand from that that you can a) not rearrange the order of internal tabs, you can only switch them on or off and b) you can't use the internal groups like you want in other custom tabs.

So you can choose now if you simply set the print tab to visible (which I would prefer, doesn't really make a difference where the tab is positioned, main thing is that it is available and working) or if you completely build an own tab where you insert all the functions you want to have manually - but you will not be able to insert anything of the original tab there as these functions are not available for custom manipulation or inserting in own ribbons (as far as I've understood that).

Here's another helpful link from MS which was removed by MS but available in the Google cache which shows some nice examples how to customize the Ribbon layout in the backstage area - maybe helpful if you want to create a custom print ribbon:



AL_XResearchAuthor Commented:
AL_XResearchAuthor Commented:
Can anyone help ? I really need to add the standard print tab (or some of it's functionality) to my custom backstage ribbon. I have looked all over the internet and no one appears to have tried to do this - I find that hard to believe.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

AL_XResearchAuthor Commented:
If there any Excel 2010+ developers out there who have created more than a basic custom ribbon then they must have come across this issue - please let me know.

I did not especially that but worked with Ribbons in general with A2007 and E2007. That's similar to E2010, only few differences.
So first you should open a blank workbook and open Excel options, then go to "Advanced" and scroll down to "General" where you'll find an option "Show add-in user interface errors". During development of ribbons, leave that activated. That will show you any specific error in your XML definition of your ribbon. In your case it shows a bunch of errors which you must repair first.

I also recommend to check your XML first by using different tools like opening with Internet Explorer or with XML editor or XML check of Notepad++ or whatever. They all have different levels of detail information which can tell you where you have an error in the structure. If that is corrected you need to check i.e. if the callback functions are available (if any) and if you have the correct MS IDs in case of internal Office command functions.

You find all you need about ribbons here (search especially for "Backstage"):

There is also a ribbon editor you can use to create the XML file.


AL_XResearchAuthor Commented:
Thanks Christian for your detailed response. There are no errors in my XML.

I use the CustomUI editor (Click here) to create my ribbon definition. I have used this for several years and am very confident in it. It validates my XML and so I can be sure my code is valid.

I should mention at this point that the excel system I have created is a very large system (i.e. 79 modules, 200 functions, 160 subs and 29 screens) and has a full custom ribbon consisting of 7 custom tabs (not including Backstage). All the callbacks are available and work. The Print actually works (and shows the preview) - it's just in the wrong place.

My main issue is that it does not appear where I have placed it in the XML. I have several buttons and custom backstage tabs, then the inbuilt print tab and then more custom buttons and then xml to disable the in-built backstage controls. Despite this the print tab goes straight to the top of my custom backstage view.

I know the URL you have indicated very well. It is very helpful (and one of the few sites that gives detailed information and clear examples) but nowhere there or elsewhere on the internet can I see any guidance on how to enable and position an in-built tab amongst your own controls.

Unfortunately I cannot post the actual workbook as it is for a client and is proprietary. I have however included an example workbook of what I am trying to achieve in an earlier post for this question.

Thanks once again, any additional thoughts would be welcome.

when I started your workbook sample with this setting it prompted me for several errors, in detail:

Line 19, Column 60
Failed to find Office control by ID
ID: GroupPrintProtectedView

Line 20, Column 56
Failed to find Office control by ID
ID: GroupPrintSettings

Line 21, Column 55
Failed to find Office control by ID
ID: GroupPrintPreview

Line 5, Column 12
Failed to find Office control by ID
ID: TabPublish

Line 30, Column 47
Unknown Office control ID: TabSave

Line 31, Column 54
Unknown Office control ID: TabOfficeStart

That doesn't look like a valid XML...;-)

Maybe these are IDs you are using in your real workbook and forgot to remove here?
It shows me three tabs after error output: Alpha, MyPrint and Beta, all empty.

So as far as I know from my own ribbons you can create your own tabs (this seems to work here) and then add internal Office functions by using the right OfficeIDs (idMso).

Here G.Avenius shows how to create a custom Office menu:
Backstage View

And here how to find the idMso IDs:
Where can I find the idMSO for a Ribbon Control or imageMso for a symbol in a Ribbon Control?

There should be no problem to add the print tab at the right position using this method.

(It would be helpful to post the XML of your custom UI as I do not have access to the custom UI editor right now.)


AL_XResearchAuthor Commented:
I have put my RibbonX below - although 90% has been removed as it covers 16 pages (!) - it is just for your reference. I am not sure what you really want to look at, my example workbook (whilst it may not work gives the same idea).

customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="rxc_OnLoadRibbon">
		<command idMso="Help" onAction="rxa_showQuickHelp" />
	<ribbon startFromScratch="true">
			<!-- **************** Standard MS Excel ribbons -->
			<tab idMso="TabHome" getVisible="rxc_XLTabDisplay" />
			<tab idMso="TabInsert" getVisible="rxc_XLTabDisplay" />
			<tab idMso="TabPageLayoutExcel" getVisible="rxc_XLTabDisplay" />
			<tab idMso="TabFormulas" getVisible="rxc_XLTabDisplay" />
			<tab idMso="TabData" getVisible="rxc_XLTabDisplay" />
			<tab idMso="TabReview" getVisible="rxc_XLTabDisplay" />
			<tab idMso="TabView" getVisible="rxc_XLTabDisplay" />
			<tab idMso="TabDeveloper" getVisible="rxc_XLTabDisplay" />

			<!-- **************** Data Entry -->
			<tab id="mct_DataEntry" >
				<!-- Code for this here -->
			<!-- More tabs -->

	<backstage onShow="rxc_refreshBackstage">
		<button id="mcb_bckstg_Login" label="Login"  />
		<button id="mcb_bckstg_Logout" label="Logout" /> 
		<button id="mcb_RequestPasswordReset" label="Request Password Reset" />
		<tab id="bcksg_tab1" >
		<tab id="bcksg_tab2" >
		<button id="mcb_bckstg_HelpContents" label="Help" />
		<button id="mcb_bckstg_HelpAbout" label="About"/>
		<button id="mcb_bckstg_exitSystem" label="Exit Client"  />
		<!-- Disable the standard backstage controls -->
		<button idMso="FileSave" visible="false"/>
		<button idMso="FileSaveAs" visible="false" />
		<button idMso="FileOpen" visible="false" />
		<button idMso="FileClose" visible="false" />
		<button idMso="ApplicationOptionsDialog" visible="false" />
        	<button idMso="FileExit" visible="false" />
		<tab idMso="TabInfo" visible="false" />
		<tab idMso="TabRecent" visible="false" />
		<tab idMso="TabNew" visible="false" />
		<tab idMso="TabPrint" />
		<tab idMso="TabShare" visible="false" />
		<tab idMso="TabHelp" visible="false" />
		<tab idMso="TabPublish" visible="false" />
		<tab idMso="TabSave" visible="false" />
		<tab idMso="TabOfficeStart" visible="false" />

Open in new window

I will appreciate any suggestions you can make as this is really got the better of me and I need to correct it asap for my client. Many thanks in advance.
AL_XResearchAuthor Commented:
Thanks very much Christian, I remember reading this page long ago but had missed the "You cannot re-order existing tabs" - probably I skipped over it as it is largely referring to customizing existing tabs / groups.

Thank you for drawing my attention to the MS removed page. I read this some time back and it was a very useful starting point - I don't know why they would remove it.

I have to say I think it is a big miss from MS for not allowing re positioning of in-built backstage tabs. In fact the manipulation and control of all the backstage controls is limited indeed when compared with the main ribbon. I initially hated the ribbon but once you get your head around the 'reverse logic' of being unable to change it from the VBA it is actually a good interface and makes it easy to put a good-looking front on your development.

Many thanks again.

yes, I agree in your opinion about the Ribbons: They give self-written applications a more professional look and are easy to use, but MS should really make it simpler to customize them (also a better documentation would be good). If there were not pages like accessribbon.de it would be really hard to figure out how to customize them.

Maybe they change the possibility of customizations in future but there is a higher chance that it will be completely replaced sometime in the future by something more strange like Windows 8...


AL_XResearchAuthor Commented:
Cheers for your help Christian.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.