An error occurred while loading image with relationship ID ...

J

JeffreyW

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.

I appreciate any insights on what I might need to do here.


Jeff
 
J

Jeff

Comparing my XML code with other examples, I found that the MS Office
2007 Custom UI Editor apparently assembled my image relationships in
the "customUI.xml.rels" file out of order. Instead of the apparently
correct sequence of:

<Relationship Id="myID" Type="http://schemas.openxmlformats.org/
officeDocument/2006/relationships/image" Target="images/myIcon.png" /
.... it assembled the string in this fashion (with the Relationship Id
at the end instead of at the beginning):

<Type="http://schemas.openxmlformats.org/officeDocument/2006/
relationships/image" Target="images/myIcon.png" Relationship
Id="myID" />

Since this latter code was built entirely be the MS Office 2007 Custom
UI Editor, I can only conclude that this is a bug in the editor,
possibly activated by my building my Ribbon button XML code first,
then saving the *.xlam file, and in a subsequent session, adding the
icon.png files.

Perhaps this will help someone else.
 
J

Jeff

Comparing my XML code with other examples, I found that the MS
Office
2007 Custom UI Editor apparently assembled my image relationships in
the "customUI.xml.rels" file out of order. Instead of the apparently
correct sequence of:

<Relationship Id="myID" Type="http://schemas.openxmlformats.org/
officeDocument/2006/relationships/image" Target="images/myIcon.png" /
..... it assembled the string in this fashion (with the Relationship Id
at the end instead of at the beginning):

<Type="http://schemas.openxmlformats.org/officeDocument/2006/
relationships/image" Target="images/myIcon.png" Relationship
Id="myID" />

Since this latter code was built entirely be the MS Office 2007 Custom
UI Editor, I can only conclude that this is a bug in the editor,
possibly activated by my building my Ribbon button XML code first,
then saving the *.xlam file, and in a subsequent session, adding the
icon.png files.

Perhaps this will help someone else.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top