PDA

View Full Version : How To Create Medium Size Button In Excel Office Ribbon Tab



Ashu2021
05-11-2014, 12:57 AM
I want to create two buttons like 'wrap text' and 'Merge' at home tab. Mean only two buttons well align. But I am getting only two option normal or large. If I am using normal, its creating space for three buttons nd if I use Large, its create only single button. Pls sugest, how I can do it

Excel Fox
05-11-2014, 10:17 AM
To give a better idea of what you are getting now, attach a snapshot. But before that, try something like this



<customUI onLoad="AlphaRibbonOnLoad" xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab idMso="TabFormulas">
<group id="myGroupID" label="MyGroupLabel">
<button
id = "myButtonOneID"
label = "MyButtonOneLabel"
size = "normal"
onAction = "MyButtonOneAction"
imageMso = "ReviewShowAllComments"
screentip = "Tip: MyButtonOne Tip"
supertip="MyButtonOne Supertip" />
<button
id = "myButtonTwoID"
label = "MyButtonTwoLabel"
size = "normal"
onAction = "MyButtonTwoAction"
screentip = "Tip: MyButtonTwo Tip"
supertip = "ExcelFox has all your ribbonX solutions"
imageMso="SheetProtect" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>

Excel Fox
05-11-2014, 10:20 AM
Replace
xmlns="http://schemas.microsoft.com/office/2009/07/customui used for Excel 2010 (and 2013) with
xmlns="http://schemas.microsoft.com/office/2006/01/customui for Excel 2007

Ashu2021
05-12-2014, 09:58 AM
Thanks for reply, but in the example, we have space to create third button. However, I want to create only two buttons which will look like in alignment group of home tbtab in excel

Excel Fox
05-12-2014, 11:36 AM
Ah, so you wanted to ensure that there are no unwanted spaces after the two buttons. The vertical alignment of two rows of button across the three existing row spaces of the ribbon group is not doable at least in the current xml schemas for Office 2007 and 2010. The MS CustomUI development team might come up with something in the future (not sure).