Export, prepare to edit, and import the ribbon
Note
This topic is about classic commands.
There is a new way to define commands. See Modern commanding overview (preview).
To edit the ribbon, you must perform the following steps:
Edit the
<RibbonDiffXml>
Export the ribbon
You export the ribbon by including it in a solution and then exporting the solution. You can export all the customizations, but that can represent a large amount of data. We recommend that you use an existing unmanaged solution or create a new solution.
Create a new solution
Go to Settings > Customizations.
Go to Settings > Solutions.
Select New.
Type a meaningful Display Name, Name and enter a Publisher and type a Version number.
Note
You can usually use the default publisher for the organization.
Select the Save icon.
If you want to edit the ribbon for specific tables:
Select Add Existing and then select Entity.
Select the tables you want to include in the solution and then select OK.
Note
For the purpose of editing table ribbons, you do not have to include required components. If you intend to export this solution and apply it to another system, you should include required components.
If you want to edit global ribbons or add a custom group to all tables, select Add Existing and then select Application Ribbons.
Select Save and Close.
Use an existing solution
Go to Settings > Customizations.
Go to Settings > Solutions.
Double-click a solution to open it.
If you want to edit the ribbon for specific tables:
Select Add Existing and then click Entity.
Select the tables you want to include in the solution and then select OK.
Note
For the purpose of editing table ribbons, you do not have to include required components. If you intend to export this solution and apply it to another system, you should include required components.
If you want to edit global ribbons, such as to add custom button to all tables: select Add Existing and then select Application Ribbons.
Select Save and Close.
Export the ribbon
Go to Settings > Customizations.
Go to Settings > Solutions.
Select the solution you want and then select Export.
If you have made recent changes that have not yet been published, select Publish All Customizations. Otherwise, select Next.
With the Unmanaged option selected, select Export.
Select Save in the File Download dialog box and then select Open Folder in the Download complete dialog box.
Right-click the compressed .zip file that you downloaded and select Extract All... .
Select a location to extract the files and then select Extract.
The customizations.xml file is the file that you will edit.
Prepare to edit the XML
or a better experience, edit the customizations.xml file with an application that can use schema validation to provide IntelliSense support. For more information, see Edit the customizations file with schema validation.
Import the ribbon
After you have edited the customization.xml file, from Visual Studio or Visual Web Developer 2010 Express, right-click the customization.xml tab and select Open Containing Folder.
Select all of the files or folders that were included when you extracted the solution. Right-click the selected files, select Send to, and then select Compressed (zipped) folder.
Note
This creates a compressed .zip file in the same folder. The name of the file may vary, but it will be the same as one of the other files in the folder - except with a .zip file name extension.
Go to Settings > Customizations.
Go to Settings > Solutions.
Select Import.
Select Browse and locate the compressed .zip file that you created in step 2 of this procedure.
Select Next and then select Import.
After the import has finished, you will see the message indicating that the import completed successfully. Select Close.
After you have successfully imported your solution, you must publish customizations before you can see the changes. In the solutions list, select Publish All Customizations.
Dealing with errors on import
If you receive a notification that there were errors that caused the import to fail, select Export Log.
Save the export log file. Select the file and right-click it. Click Open With and then select Microsoft Office Excel.
Select the Components worksheet and note any messages in the ErrorText column.
Tip
The most common type of failure is an error when referencing a dependent element in the RibbonDiffXml. Perhaps you forgot to include a LocLabel that was referenced somewhere. Perhaps there is an extra blank character included at the end of an XML parameter referencing another element. All references must match exactly.
After you have corrected the error, complete the steps to import the ribbon again.
Troubleshoot ribbon issues
If you are experiencing an issue with a ribbon command bar button, use this troubleshooting guide to find and solve the problem.
See also
Customize the ribbon
Export ribbon definitions
Use localized labels with ribbons