Reputation: 110
I have a customized ribbon in Excel and I want to replicate it in Power Point. I thought that the most difficult part would be addapting the macros, but I came across another problem: I cannot get my images to show in the ribbon. In the code below, both "my_image1" and "my_image2" show fine in Excel, but not in PP.
I have several images integrated into the file (using the Custon UI Editor) and it works perfectly in Excel. But in Power Point none of the images is shown.
I read that images need to be loaded before using them (https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa338202(v=office.12)) but I really do not get it.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="customTab" label="My Ribbon"> <!--insertBeforeMso="TabHome"-->
<group id="Group1" label="Group 1">
<gallery
id="Gallery1"
label="Gallery 1"
columns="3"
rows="3"
image="my_image1"
showItemLabel="false"
size="large"
onAction="Insert_image"
itemHeight="60"
itemWidth="120"
screentip=" "
supertip=" " >
<item id="image01" label="Image 01" screentip="image description" image="my_image2" />
Etc...
Could someone help with this issue? Do I need to include some other VBA code? I could not find any straightforward anwser for this problem.
Thank you!
Upvotes: 0
Views: 345
Reputation: 49395
The Ribbon XML code looks good. I don't see anything strange in your code.
I'd suggest checking the following points:
Make sure there are no ribbon UI errors are displayed when the file is opened. To view any errors that your XML markup generates when it is loaded, follow these steps:
Read more about that in the How to: Show Add-in user interface errors article.
Finally, you can declare a ribbon callback getImage
for getting the image. In that scenario, you will be able to see what happens in the code. Because your code is responsible for loading and locating images.
Upvotes: 2