View Single Post
 
Old 04-30-2021, 07:58 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I had a play around with the file and it appears that you can apply a built-in image (ie imageMso) but not a custom image to a gallery that uses an idMso. The best I could come up with was to create a menu and put the gallery inside that. The menu shows your custom image but the two galleries don't. Interestingly, this doesn't stop the customUI code from validating so I would consider this a MS bug.
Code:
<gallery idMso="CustomAutoTextGallery" label="Lunge64" size="large" image="Lunge128" />
<menu id="M1" label="Lunge" size="large" image="Lunge64">
    <gallery idMso="CustomAutoTextGallery" label="Lunge" image="Lunge64" />                
</menu>
Although this gives you your custom icon on the ribbon, it does require a second click to show the building blocks.
The size of the image you put into the customUI was WAY excessive - it really shouldn't be any larger than 64 pixels by 64 pixels. I saved yours down to that size which brought the file size down to an acceptable level. I also tried converting your Word 2007 CustomUI to Word 2010+ to see if that made a difference (it didn't).

FWIW, the only way I can see to create a one step gallery with your custom image is to use a bunch of vba code to either create a dynamic gallery or to hand code (in the CustomUI xml) all the building blocks into a gallery using the id attribute. Neither of these options are simple and require VBA code to execute them so I wouldn't recommend those alternatives.
Attached Images
File Type: png Lunge64.png (11.1 KB, 12 views)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote