Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

My organization recently got upgraded to Office 2010 (from XP), so I've just started learning about ribbon customization. I've hit a few roadblocks here and there, but for the most part, I've been able to catch on pretty quickly. I've recently hit a roadblock, though, that seems to have gotten the best of me. I'm starting to think it may just not be possible, but I figured I should ask here before giving up.

I was looking to add a small dropdown menu, in which the items inside would be linked to different macros (which I already have). That part wasn't too difficult, but I stumbled upon this gallery feature, which has distracted me because the icons can appear much larger than they typically do (I have some nice, large icons saved in the template), rather than being just normal or large. The problem is that I can't add an onAction variable to an item, so it appears my options are to either 1) use buttons, which can trigger a macro; or 2) use items, which will look real nice, but do nothing.

Here's an example of a gallery that uses items:

<gallery id="SaveGallery" image="Save" label="Save +" itemHeight="128" itemWidth="128" columns="2" rows="2">
        <item id="SaveClose" image="SaveClose" label="Save + close document"
            screentip="Save and close this document" />
        <item id="NoSaveClose" image="NoSaveClose" label="close without saving"
            screentip="Close this document without saving, then minimize Word to the taskbar" />
</gallery>

As you can see, I've manually set the height and width of the items using itemHeight and itemWidth, so if I change the item to a button (which does work), those size parameters are obviously ignored. I even tried using the code buttonHeight, but that gave me a nice error. This would be perfect if I could get the items to run a macro when pressed.

I feel like I'm just missing something about how galleries work. I don't understand their purpose if I can't do anything when pressing an item in the gallery.

Am I trying to do something that's just not possible? Thanks in advance to anyone who can provide some guidance.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.