Results 1 to 6 of 6

Thread: Office RibbonX - Large SubMenu Items Within A Dynamic Menu

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0

    Office RibbonX - Large SubMenu Items Within A Dynamic Menu

    Is it possible to get LARGE submenu items within a dynamic menu?
    It is possible to create LARGE submenu items within a normal / static menu!
    I tried a combination putting a dynamic into a static menu - but this does not do the trick...
    Kindly view the attachment to see what I am after...
    Any ideas are highly appreciated...
    Attached Files Attached Files

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Before downloading your sample file, I should ask, did you try using the gallery?
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    My other question to you would be, if you are hard-coding your dynamic menu content, then why keep it dynamic anyway? I don't see your code expanding in any way. Or was it just for the example's sake?

    The itemSize keyword, as you rightly said, cannot be used as an attribute in the XML. It should actually placed at the same line as the schema definition for the dynamic menu. Basically, your XML should look like this

    Code:
    'Callback getContent for the Dynamic Menu
    Sub RDBdynamicMenuContent(control As IRibbonControl, ByRef returnedVal)
        Dim xml As String
            xml = "<menu xmlns=""http://schemas.microsoft.com/office/2009/07/customui"" itemSize=""large"">" & _
                  "<menu id=""MyMacroSubMenu"" label=""Macro Sub-Menu"" itemSize=""large"">" & _
                  "<button id=""Sub1But1"" imageMso=""AppointmentColor1"" label=""Smile"" onAction=""Macro1"" description=""Beschreibung Macro1""/>" & _
                  "<button id=""Sub1But2"" imageMso=""AppointmentColor2"" label=""Paint"" onAction=""Macro2"" description=""Beschreibung Macro2""/>" & _
                  "<button id=""Sub1But3"" imageMso=""AppointmentColor3"" label=""Filter"" onAction=""Macro3"" description=""Beschreibung Macro3""/>" & _
                  "</menu>" & _
                  "</menu>"
    
        returnedVal = xml
    
    End Sub
    
    'Callback getContent for the Stanamic Menu
    Sub RDBdynamicMenuContent2(control As IRibbonControl, ByRef returnedVal)
        Dim xml As String
            xml = "<menu xmlns=""http://schemas.microsoft.com/office/2009/07/customui"" itemSize=""large"">" & _
                  "<button id=""Sub1But1"" imageMso=""AppointmentColor1"" label=""Smile"" onAction=""Macro1"" description=""Beschreibung Macro1""/>" & _
                  "<button id=""Sub1But2"" imageMso=""AppointmentColor2"" label=""Paint"" onAction=""Macro2"" description=""Beschreibung Macro2""/>" & _
                  "<button id=""Sub1But3"" imageMso=""AppointmentColor3"" label=""Filter"" onAction=""Macro3"" description=""Beschreibung Macro3""/>" & _
                  "</menu>"
    
        returnedVal = xml
    
    End Sub
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  4. #4
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0
    A W E S O M E !
    Last month I've read the entire RibbonX book, but this didn't help to figure out what I was doing wrong.
    THANK YOU for taking the time to look into my example file. I am working on a very complex Add-In. Therefore sometimes it helps to put certain issues in a simple sample file to home in on the problem more easily. What I wasn't able to do - you accomplished! Within my Add-In I used the itemSize command at the position you suggested and S U C C E S S!
    I must say "Thank you" one more time to express my honest gratitude.

  5. #5
    Junior Member
    Join Date
    Dec 2014
    Posts
    1
    Rep Power
    0

    Question Ribbon file generating error

    I am getting an error with I import the above ribbon file, is there any way to Turn on error messages for the ribbon UI in Excel 2007 so that I can understand what the error is and then post here for some help?

  6. #6
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    I am guessing it's because you got the wrong schema
    Replace
    Code:
    http://schemas.microsoft.com/office/2009/07/customui
    with
    Code:
    http://schemas.microsoft.com/office/2006/01/customui
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. Replies: 1
    Last Post: 11-23-2013, 08:41 PM
  2. Office Version Independent Non-Activex Date Time Picker Using Form Controls
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 07-17-2013, 12:27 AM
  3. Replies: 4
    Last Post: 07-02-2013, 03:43 PM
  4. Replies: 14
    Last Post: 06-27-2013, 10:57 AM
  5. Using Office.CommandBar
    By Rasm in forum Excel Help
    Replies: 2
    Last Post: 12-03-2011, 06:04 AM

Tags for this Thread

Posting Permissions

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