Hello,
While trying to update an Excel 2003 Add-In to 2007, I thought I finally had the hang of getting the XML code and inserted. *.PNG Icon image in the MS Office 2007 Custom UI Editor to work in conjunction with the necessary VBA code because I was able to accomplish same with a single instance of this process. So, I continued to add a couple dozen more of these images to my *.xlam file, added the appropriate "image="" parameters to the XML, saved and closed the Editor and then opened the *.xlam file in Excel 2007. However, I am now getting a slew of "An error occurred while loading image with relationship ID ..." errors (with each specifying the name of the embedded icon file) - I believe I am getting one error for each image now in the file. All of the images are *.PNG files. Help is not available in any form.
I appreciate any insights on what I might need to do here.
Thanks beforehand.
- Login or Signup Now to post comments

When you compare your XML code with other examples, you may find that the MSOffice 2007 Custom UI Editor has assembled the image relationships in the "customUI.xml.rels" file out of order, instead of the following right way:
<Relationship Id="myID" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="images/myIcon.png" />
It could have assembled the string in the following manner, which puts the relationship Id at the end instead of at the beginning:
<Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="images/myIcon.png" RelationshipId="myID" />
Putting in mind that the latter code was built entirely be the MS Office 2007 Custom UI Editor, the error you are getting could be a bug in the editor, which could have been possibly activated by your building my Ribbon button XML code first, and later on saving the *.xlam file, and after that adding the icon.png files.
Regards,
Carl