Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Office ribbon merging tabs using xml namespace

Posted on 2011-09-27
5
Medium Priority
?
1,312 Views
Last Modified: 2012-05-12
I have previously been able to use namespaces with the IdQ attribute in ribbon xml to allow different applications to share user-defined ribbon tabs and groups - an example:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" xmlns:x="urn:ns:myNamespace">
  <ribbon>
    <tabs>
      <tab idQ="x:tabRibbon" label="Custom tab">
        <group idQ="x:groupLookupTool" label="Interactive Lookup Tool">
          <button id="btnFindCommand" label="Find a Command" size="large" imageMso="CreateReportFromWizard" screentip="Interactive Lookup Tool" supertip="Point at Excel 2002 buttons and commands to see them in Excel 2007" onAction="openApp" tag="C:\Program Files\Microsoft Office\Interactive Guides\Interactive - Excel 2003 to Excel 2007 command reference.exe"/>
        </group>
        <group idQ="x:groupTraining" label="Get Online Training">
          <button id="btnTraining" label="Up to Speed Course" size="large" imageMso="MovieFromFileInsert" screentip="Up to Speed Course" supertip="Learn quickly how to use Excel 2007." onAction="openPage" tag="http://office.microsoft.com/en-gb/training/HA102189871033.aspx"/>
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

Open in new window

Then other people can define similar xml using the same namespace and Excel will merge the groups correctly. This works fine when you can control the xml, but I have a developer using VS 2010 who has set up a complex ribbon using the ribbon designer, and does not want to redefine it using the xml file route.  
Is it possible using the visual designer to insert the correct namespace and idQ tabs to allow this sort of usage?
Alternatively, is there a simple way for him to export from the designer but still use the callbacks he has defined?
0
Comment
Question by:andrewssd3
  • 3
5 Comments
 
LVL 8

Accepted Solution

by:
jagrut_patel earned 1000 total points
ID: 36709892
AFAIK, there are 2 ways to define a Ribbon in VS.
1. Visual designer
2. XML

So it should be possible to replace Visual Designer approach with XML file and thus achieve what you need.
0
 
LVL 17

Author Comment

by:andrewssd3
ID: 36710218
I'm not familiar with the visual designer route, but my preference would be for a solution that tells me how to add the namespace and idQ tags in the visual designer - I'm surprised you can't do this, but my developer tells me he can't find how to.  
If this is absolutely not possible I'd like to know the steps to convert a visually designed ribbon into an xml ribbon.  I've seen the export to xml option, but that doesn't seem to generate any code to hook up the callbacks, etc that have been defined for the visual version.
0
 
LVL 36

Assisted Solution

by:Miguel Oz
Miguel Oz earned 1000 total points
ID: 36712938
Steps to export the file:
http://msdn.microsoft.com/en-us/library/bb386297.aspx

You need to add the code for the callbacks manually unfortunately. You may build a console app to automate this part if you really have many callbacks or it is a work in progress.
0
 
LVL 17

Author Comment

by:andrewssd3
ID: 36814703
Thank you both for your comments.  I want to do a bit more research myself on this tonight and I'll look at assigning points tomorrow.
0
 
LVL 17

Author Closing Comment

by:andrewssd3
ID: 36921221
Thanks - I've persuaded the developer to take the xml route, but your comments were helpful in eliminating the possibility of doing it via the visual designer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question