Welcome to MSDN Blogs Sign in | Join | Help

Working with RibbonX

When you customize the ribbon with the June CTP of VSTO, it can be difficult to identify errors in your XML markup. Because XML is case-sensitive, it is easy to introduce errors and can be difficult to find exactly where in your mark up the error occurs.  Two things you should do to help resolve this:

1.  Get IntelliSense. If you attach the schema that Office provides for the ribbon (called CustomUI.xsd), you'll have IntelliSense available as you type in the XML markup. This makes it much easier to add the mark up because it can be difficult to remember all of the XML tags and attributes available for various controls, and you don't have to guess what the casing for these elements should be. You can find the schema at http://www.microsoft.com/downloads/details.aspx?familyid=15805380-F2C0-4B80-9AD1-2CB0C300AEF9&displaylang=en. Save the CustomUI.xsd file to  <C:\>\Program Files\Microsoft Visual Studio 8\Xml\Schemas, and then reference it in the project properties of your add-in. You now have intelliSense!

2. Enable Error Messages. You can set an option to show UI errors within add-ins. To do this open the Options dialog box for the application and click Advanced. Scroll down to the General tab and select the Show add-in user interface errors checkbox. If you set this option in one application, it will affect all Office applications.

Now, if you try to load an add-in that has an error in the XML markup, you'll receive an error message giving you an indication of where the error occurred and why it occurred.

You can learn about this, and other tips when customizing the ribbon with VSTO in my upcoming book: Visual Studio Tools for Office for Mere Mortals.

 

--Kathleen

Published Wednesday, July 12, 2006 8:46 AM by kmcgrath
Filed under:

Comments

# [VSTO] Activer l'Intellisense pour le d&amp;#233;veloppement du Rubon d'Office System 2007

Kathleen Mcgrath nous donne, via son blog, la technique &#224; utiliser pour &#234;tre en mesure d'avoir &#224; sa disposition,...
Wednesday, July 12, 2006 7:21 AM by Thomas Lebrun

# re: Working with RibbonX

The document "Customizing the Office (2007) Ribbon User Interface for Developers (Part 2 of 2) specifies that the dropDown control should have a getText callback but the IntelliSense does not have that in the schema.
Please advise,
Michael
Wednesday, August 09, 2006 1:25 PM by Michael S. Scherotter

# re: Working with RibbonX

Hi Michael,

The schema was updated after the article you reference was published. The getText callback was eliminated for the dropdown control, and the article should be updated in the near future to reflect that change.
Wednesday, August 09, 2006 5:52 PM by kmcgrath
Anonymous comments are disabled
 
Page view tracker