Consulting

Results 1 to 4 of 4

Thread: Custom image for shared Add-in ribbon doesn't show.

  1. #1

    Custom image for shared Add-in ribbon doesn't show.

    Hello,
    I've got my Excel ribbon tab to the point where a second xlam appears within the drop down menu of the first using the following XML for both. However, the image does not appear when I change menu id to idQ. If I change the idQ back to id, or if I change custom image to imageMso, it works fine. Basically, I'm trying to add (x) number of add-ins to a dropdown menu within my custom tab. Is there a better way to do this so that I can use my custom image?

    First Add-in:

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"  
    xmlns:x="myNameSpace"> 
     
      <ribbon> 
        <tabs> 
          <tab idQ="x:GabeTab" label="RehabCalcs" insertAfterMso="Add-Ins"> 
                     
            <group id="customGroup1" label="Prescription"> 
              <button id="customButton1"  size="large" onAction="OpenCalc" image="Rx2" />         
            </group> 
     
            <group idQ="x:customGroup2" label="Exercises"> 
              <menu idQ="x:MyDropdownMenu" size="large" image="Ex2" > 
                <button id="customButton2" label="Postures"  onAction="Postures"  /> 
              </menu>         
            </group> 
     
        <group idQ="x:customGroup3" label="Assessment"> 
              <menu idQ="x:MyDropdownMenu2"  size="large" image="Ax2"  > 
                <button id="customButton3" label="Ax1Button"  onAction="Macro1"  /> 
            </menu>     
          </group> 
     
        </tab> 
        </tabs> 
      </ribbon>
    Second Add-in:

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"  
    xmlns:x="myNameSpace"> 
     
      <ribbon> 
        <tabs> 
          <tab idQ="x:GabeTab" label="RehabCalcs" insertAfterMso="Add-Ins"> 
                     
            <group idQ="x:customGroup2" label="Exercises"> 
              <menu idQ="x:MyDropdownMenu" size="large" image="Ex2" > 
                <button id="customButton4" label="Two"  onAction="Postures2"  /> 
              </menu>         
            </group> 
     
        <group idQ="x:customGroup3" label="Assessment"> 
              <menu idQ="x:MyDropdownMenu2" size="large" image="Ax2" > 
                <button id="customButton5" label="Yup"  onAction="Macro2"  /> 
            </menu>     
          </group> 
     
        </tab> 
        </tabs> 
      </ribbon> 
    </customUI>
    Thanks for your help.
    Gabe

  2. #2
    In case anyone is interested in the solution (got no help here), you need to use splitButton and it will display your custom shared image.

    Here is the code:

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"  
    xmlns:x="myNameSpace"> 
     
      <ribbon> 
        <tabs> 
          <tab idQ="x:GabeTab" label="RehabCalcs" insertAfterMso="Add-Ins"> 
            <group idQ="x:customGroup4" label="RehabCalcs"> 
              <splitButton idQ="x:mySplitButton" size="large"> 
                <button id="customButton13" image="Ax2" label="Assessments" /> 
                <menu idQ="x:splitMenu" itemSize="normal"> 
                  <!-- use itemSize = large or use normal --> 
                  <button id="customButton14" onAction="Macro14" label="Grip Strength/Effort"/> 
                </menu> 
              </splitButton> 
              <splitButton idQ="x:mySplitButton2" size="large"> 
                <button id="customButton15" image="Ex2" label="Exercises" /> 
                <menu idQ="x:splitMenu" itemSize="normal"> 
                  <!-- use itemSize = large or use normal --> 
                  <button id="customButton16" onAction="Postures" label="Postures"/> 
                </menu> 
              </splitButton> 
              <splitButton idQ="x:mySplitButton3" size="large"> 
                <button id="customButton17" image="Rx2" label="Prescription" /> 
                <menu idQ="x:splitMenu" itemSize="normal"> 
                  <!-- use itemSize = large or use normal --> 
                  <button id="customButton18" onAction="OpenCalc" label="Xcalc"/> 
                </menu> 
              </splitButton> 
            </group> 
     
        </tab> 
        </tabs> 
      </ribbon> 
    </customUI>

  3. #3
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by gabethegrape
    In case anyone is interested in the solution (got no help here)
    I'm sorry, but this really picks me. You posted at 5:30PM on a Friday and answered the question on... what... Sunday?

    You're asking a question that is not exactly a run of the mill question, to be honest. There are few playing with the Ribbon yet, and even fewer trying to work with shared namespaces. To expect this answered on a weekend might be expecting a bit too much.

    The people that make this forum run are all volunteers. We're not paid a dime to help you do your work. If you want a solution right now, pay someone for it.

    Many of us have solved our own issues before someone else, but I'm hard pressed of any of our regulars that have come back and posted a gripe about it.

    Even worse, I see that you cross posted this and didn't bother to advise anyone. What if Steve over at pschmid.net was actively working on this? How do you think he'd feel knowing that you had someone else working on it at the same time?
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  4. #4
    You're right. I had to re-read my post to figure out why you got so upset. I meant no offense. I'm just very impatient. I'm also deeply appreciative of the support I get here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •