Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2007: Build custom ribbon tab from XML from two templates

Status
Not open for further replies.

BrianWen

Programmer
Jun 8, 2009
102
0
0
DK
OK, so I'm totally new to creating ribbon menus with Custom UI Editor for Office 2007/2010. And I have a problem I hope some of you can solve.

I have a .dotm template in Word 2007's STARTUP folder. In that I have added XML which adds a custom tab in the ribbon:

<customUI xmlns=" <ribbon>
<tabs>
<tab id="NewTab" label="Templates">
<group id="Templates" label="Templates">
<button id="new" label="New document" imageMso="ColumnsDialog" size="large" onAction="Module1.Start" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>

It works perfectly, launching Start() in Module1 when clicking the New Document button. However, that button actually launches a list of other .dotm files for the user to select from. So, the user launches one of those .dotm files, so that both the first .dotm file (in STARTUP) and the new one is loaded. The new .dotm also has some XML:

<customUI xmlns=" <ribbon>
<tabs>
<tab id="NewTab" label="Templates">
<group id="Templates" label="Templates">
<button id="new2" label="Change setup" imageMso="" size="large" onAction="Module1.ChangeSetup" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>

Now, of course I want those two buttons to be next to each other, same tab, same group and all. Problem is Word displays two diffenret tabs, completly alike (Called Templates with a group called Templates). Even though they have same id's exept the buton id. Is there a way to correct this, when the buttons comes from two different templates?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top