Reputation: 555
For Excel I am using the attribute startFromScratch="True" to remove the ribbon tabs, but it is also removing the close button of the workbook (see picture). Is there a way to not remove it? I know that you can use startFromScratch and separately you can show a tab you want via VBA as this website explains: http://www.msofficegurus.com/post/Customizing-the-Ribbon-startFromScratch-and-Tab-visibility.aspx
Now, is it possible to add the close button again? I belive that there may be a similar code to show it via VBA.
Upvotes: 0
Views: 901
Reputation: 35557
This is the code I use:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<qat>
<documentControls>
<control
idMso="FileSaveAs"
screentip="SAVE AS..."
supertip="Click here to save this file to another location."/>
<control
idMso="WindowSwitchWindowsMenuExcel"
screentip="SWITCH EXCEL FILE"
supertip="Click here to switch from this workbook to another open excel file."/>
<control
idMso="FilePrint"
screentip="PRINT FILE"
supertip="Click here to enable the print menu."/>
</documentControls>
</qat>
</ribbon>
</customUI>
EDIT
In the version of Excel that I'm using the following xml does not hide those buttons:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true"></ribbon>
</customUI>
Upvotes: 0