• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Custom UI Editor For Microsoft Office Doubt

With the following XML code I can see only one group. Can anyone advise me how to add a New Group to the ribbon bar?

Code:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab
id="Tab1"
label="QUICK FIX">
<group
id="Group1"
label="Time Saving Tools">


<menu
id="Menu1"
image="Home"
label="Menu"
size="large">

<menu
id="Menu2"
label="Add New"
imageMso="TablePropertiesDialog">
<button
id="Button01"
label="1. Add a new sheet with Current Date"
imageMso="ExportExcel"
onAction="AddSheetCurrentDate"/>
<button
id="Button02"
label="2. Add a Calendar Sheet with user given period"
imageMso="CreateTable"
onAction="CalendarMake"/>
<button
id="Button03"
label="3. Add a sheet with This Year Calendar"
imageMso="ViewAllProposals"
onAction="ThisYearCalendar"/>
<button
id="Button04"
label="4. Create Table of Contents"
imageMso="FunctionsLogicalInsertGallery"
onAction="TableOfContent"/>


</menu>
<menu
id="Menu3"
label="Visibility and Protection"
imageMso="DatabaseSetLogonSecurity">

<button
id="Button05"
label="1. Make this sheet very hidden"
imageMso="RelationshipsHideTable"
onAction="ActiveSheetVeryHidden"/>
<button
id="Button06"
label="2. Show all very hidden sheets"
imageMso="SubformMenu"
onAction="ShowVeryHiddenShts"/>
<button
id="Button07"
label="3. Unhide All Sheets"
imageMso="PersonaStatusOnline"
onAction="UnhideAllHiddenShts"/>
<button
id="Button08"
label="4. Protect All Sheets"
imageMso="Lock"
onAction="Protect_All_Shts"/>
<button
id="Button09"
label="5. Un-Protect All Sheets"
imageMso="FileCompatibilityChecker"
onAction="Unprotect_All_Shts"/>
<button
id="Button10"
label="6. List All Un-Protected Sheets"
imageMso="Numbering"
onAction="ListAllUnprotectedShts"/>
<button
id="Button11"
label="7. List All Visible and Hidden Sheets"
imageMso="DatasheetColumnLookup"
onAction="List_all_visible_and_hidden_shts"/>
<button
id="Button12"
label="8. Lock Cells Containing Formula"
imageMso="FileLinksToFiles"
onAction="LockCellsWithFormula"/>
<button
id="Button13"
label="9. Set Custom Zoom % For All Sheets"
imageMso="ZoomPrintPreviewExcel"
onAction="SetCustomZoomForAllShts"/>

</menu>
<menu
id="Menu4"
label="Columns and Rows"
imageMso="TablePropertiesDialog">

<button
id="Button14"
label="1. Auto Fit All Rows in this Worksheet"
imageMso="GridlinesGallery"
onAction="AutoFitAllRows1"/>
<button
id="Button15"
label="2. Auto Fit All Columns in this Worksheet"
imageMso="RelationshipsHideTable"
onAction="AutoFitColumnsInActiveSheet"/>
<button
id="Button16"
label="3. Delete All Blank Columns"
imageMso="OmsDelete"
onAction="DeleteBlankColums"/>
<button
id="Button17"
label="4. Delete All Blank Rows"
imageMso="OmsDelete"
onAction="DeleteBlankRows"/>




</menu>
<menu
id="Menu5"
label="Apply Formula On Cells and Comments"
imageMso="ActionInsert">

<button
id="Button18"
label="1. Insert Formula On Selected Cells PS:(No Undo)"
imageMso="AutoSum"
onAction="InsertFormulaOnSelectedCells"/>
<button
id="Button19"
label="2. Insert Comments (Multiple Cells)"
imageMso="WebServerDiscussions"
onAction="InsertCommentsOnSelection"/>
<button
id="Button20"
label="3. Highlight Cells with Comments PS:(No Undo) "
imageMso="ObjectEffectGlowGallery"
onAction="HighlightCommentOnCells"/>
<button
id="Button21"
label="4. Highlight Duplicated Values on the Selected Range PS:(No Undo)"
imageMso="ConditionalFormattingHighlightCompareColumns"
onAction="HighlightDuplicatedValuesOnRange"/>
<button
id="Button22"
label="5. Change Comment Box Appearance in this Sheet PS:(No Undo)"
imageMso="AppointmentColorDialog"
onAction="ChangeCommentBoxColorOnThisSheet"/>
<button
id="Button23"
label="6. Replace Blank Cells With Zero on the Selected Range PS:(No Undo)"
imageMso="O"
onAction="ReplaceBlankCellsWithZeroOnSelection"/>


</menu>
<menu
id="Menu6"
label="Menu4">
<button
id="Button5"
label="Button5"/>
<menu
id="Menu7"
label="Menu5">
<button
id="Button6"
label="Button6"/>
<button
id="Button7"
label="Button7"/>



</menu>
</menu>
</menu>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
 
Hi try... adding another group at the begining

Code:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">

<ribbon>

<tabs>

<tab

id="Tab1"

label="QUICK FIX">

<group id="Group2"label="Button Group">

<buttonGroup id="Buttongroup1">

<button id="Button1"imageMso="_1"/>

<button id="Button2"imageMso="_2"/>

<button id="Button3"imageMso="_3"/>

</buttonGroup>

</group>

<group

id="Group1"

label="Time Saving Tools">
 
It might help you.

upload_2018-1-30_19-25-1.png

Code:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<!-- **************************************************************************-->
<!-- ****Disable 'Exit Excel' and 'Excel Options' on the Office Button menu****-->
<!-- **************************************************************************-->
    <commands>
          <command idMso="ApplicationOptionsDialog" enabled="false"/>
          <command idMso="FileExit" enabled="false"/>
    </commands>
<!-- *******************************************************************-->
<!-- *****Set startFromScratch to true to hide the Ribbon and QAT*******-->
<!-- ********Hide New, Open and Save on the Office Button menu**********-->
<!-- **************Hide Contextual tabs on the Ribbon*******************-->
<!-- *******************************************************************-->
<!--http://soltechs.net/CustomUI/AllGal.asp-->
  <!-- Set startFromScratch to true to hide the Ribbon and QAT-->
  <ribbon startFromScratch="true">
    <!-- startFromScratch="true" hides all of the Ribbon tabs and it hide the QAT.  -->
    <!-- It also hides most of the commands on the Office Button menu, but for      -->
    <!-- some reason, it does not hide the 'New', 'Open' and 'Save' commands.        -->
    <!-- Also it not hides the Contextual tabs on the ribbon, for example the        -->
    <!-- Format tab that you see when you select a picture on your worksheet.        -->
    <!-- So if you want to hide them you must use the RibbonX below:                -->
    <officeMenu>
        <button idMso="FileNew" visible="false"/>
        <button idMso="FileOpen" visible="false"/>
        <button idMso="FileSave" visible="false" />
    </officeMenu>
    <contextualTabs>
        <tabSet idMso="TabSetSmartArtTools" visible="false" />
        <tabSet idMso="TabSetChartTools" visible="false" />
        <tabSet idMso="TabSetDrawingTools" visible="false" />
        <tabSet idMso="TabSetPictureTools" visible="false" />
        <tabSet idMso="TabSetPivotTableTools" visible="false" />
        <tabSet idMso="TabSetHeaderAndFooterTools" visible="false" />
        <tabSet idMso="TabSetTableToolsExcel" visible="false" />
        <tabSet idMso="TabSetPivotChartTools" visible="false" />
        <tabSet idMso="TabSetInkTools" visible="false" />
    </contextualTabs>
    <!-- Add Custom tab to the Ribbon with your own buttons-->
    <!-- The example add three groups to the new tab named 'My Tab' -->
    <!-- On the last tab there is a menu with five options-->

    <tabs>
      <tab id="MyCustomTab" label="My Menu" >

      <group id="customGroup1" label="Invoice">
          <button id="customButton1" label="New Invoice" size="large" onAction="AddNewInvoice" imageMso="ReviewAcceptChange" />
          <separator id="MySeparator1" />       
          <button id="customButton2" label="Find Invoice" size="normal" onAction="FindInvoice" imageMso="FileWorkflowTasks" />
          <button id="customButton3" label="Edit Invoice" size="normal" onAction="EditInvoice" imageMso="ReviewTrackChanges" />
          <button id="customButton4" label="Print Invoice" size="normal" onAction="PrintInvoice" imageMso="FilePrintQuick" />
          <button id="customButton6" label="Delete Invoice" size="normal" onAction="DeleteInvoice" imageMso="PrintPreviewClose" />
          <button id="customButton5" label="Export To PDF" size="normal" onAction="ExportToPDF" imageMso="FileSaveAsPdfOrXps" />
        </group>

      <group id="customGroup2" label="Product">
          <button id="customButton7" label="New Product" size="normal" onAction="AddNewProduct" imageMso="GoToNewRecord" />
          <button id="customButton8" label="Find Product" size="normal" onAction="FindProduct" imageMso="ZoomPrintPreviewExcel" />
          <button id="customButton9" label="Edit Product" size="normal" onAction="EditProduct" imageMso="QueryBuilder" />

        </group>

      <group id="customGroup3" label="Customer">
          <button id="customButton11" label="New Customer" size="normal" onAction="AddNewCustomer" imageMso="DistributionListAddNewMember"/>
          <button id="customButton12" label="Find Customer" size="normal" onAction="FindCustomer" imageMso="FileDocumentManagementInformation" />
          <button id="customButton13" label="Edit Customer" size="normal" onAction="EditCustomer" imageMso="AddOrRemoveAttendees" />
        </group>

      <group id="customGroup4" label="GST">
          <button id="customButton14" label="GST Rates" size="normal" onAction="GSTRates" imageMso="HighImportance" />
          <button id="customButton15" label="Update GST" size="normal" onAction="UpdateGSTRate" imageMso="MailMergeUpdateLabels" />
        <button id="customButton151" label="GSTR 3B" size="normal" onAction="ReportGSTR3B" imageMso="WorkflowComplete" />
        </group>
       
    <group id="customGroup5" label="Reports">
      <button id="customButton16" label="Dashboard" size="large" onAction="ReportDashbaord" imageMso="SlideMasterChartPlaceholderInsert" />
        <separator id="MySeparator2" />   
          <menu id="MyDropdownMenu1" label="Reports" size="large" imageMso="ChartTypeOtherInsertGallery"  >
            <button id="customButton24" label="Sale Report"  onAction="ReportSale" imageMso="TextAlignGallery" />
            <button id="customButton25" label="Product wise sale"  onAction="ReportSalebyProduct" imageMso="TextAlignGallery" />
            <button id="customButton26" label="Customer wise sale"  onAction="ReportSalebyCustomer" imageMso="TextAlignGallery" />
        </menu>
            <separator id="MySeparator3" />   
          <menu id="MyDropdownMenu2" label="GST Reports" size="large" imageMso="SmartArtChangeColorsGallery"  >
        <button id="customButton18" label="GSTR 3B"  onAction="ReportGSTR3B" imageMso="_3DLightingClassic" />
        <button id="customButton19" label="GSTR 1"  onAction="ReportGSTR1" imageMso="_1" />
        <button id="customButton20" label="GSTR 2"  onAction="ReportGSTR2" imageMso="_2" />
        <button id="customButton21" label="GSTR 3"  onAction="ReportGSTR3" imageMso="_3" />
        <button id="customButton22" label="GSTR 4"  onAction="ReportGSTR4" imageMso="_4" />
        <button id="customButton23" label="GSTR 5"  onAction="ReportGSTR5" imageMso="_5" />
        </menu>
        </group>
        <group id="customGroup6" label="About">
                  <button id="customButton17" label="Feedback" size="large" onAction="SubmitFeedback" imageMso="HappyFace" />
          <separator id="MySeparator4" />   
          <menu id="MyDropdownMenu4" label="Help" size="large" imageMso="TentativeAcceptInvitation"  >
          <button id="customButton28" label="Restore from old Excel"  onAction="RestoreFromOLDExcel" imageMso="FileStartWorkflow" />
        <button id="customButton29" label="Version Info"  onAction="Version" imageMso="SlideShowVolume" />
        <button id="customButton31" label="What's New"  onAction="WhatsNew" imageMso="WhatIfAnalysisMenu" />
        <button id="customButton33" label="Edit Log"  onAction="EditLogs" imageMso="PauseTimer" />
        <button id="customButton34" label="Check New Version"  onAction="CheckNewVersion" imageMso="GetExternalDataFromWeb" />
        <button id="customButton32" label="About us"  onAction="Aboutus" imageMso="Info" />
          </menu>
        </group>
       
  <group id="customGroup7" label="Misc Commands">
    <button label="Calculator" idMso="Calculator" size="large" />
<separator id="MySeparator5" />   

    <button label="Save Me" idMso="FileSave" size="large" />
    <!-- <button id="customButton30" label="Calculator" size="large" imageMso="Calculator" /> -->
  </group>


      </tab>
    </tabs>

  </ribbon>

</customUI>
 
Back
Top