InsertFile / InsertXML losing images of existing document

N

nrocha

Hi,

I'm generating a WordML file with some images. That's just going fine and
the images appear as expected in this *.xml.

After that, I save that file to the disk and use InsertFile to insert it at
a certain place in a "normal" .doc document, but, in the end, the final *.doc
doesn't have the images...or better, it has the placeholders (or frames) with
the correct size and in the correct places, but there are no image data...

The XML of the WordML that I've generated is the following:

<w:r>
<w:pict>
<v:shapetype id="_x0000_t76" />
<w:binData
w:name="wordml://EAID_B71D14E2_41EF_4dde_9BA1_99463BB3E1D2.png">(base64string
of the image data here)</w:binData>
<v:shape id="EAID_B71D14E2_41EF_4dde_9BA1_99463BB3E1D2"
type="#_x0000_t76" style="width:240;height:150">
<v:imagedata
src="wordml://EAID_B71D14E2_41EF_4dde_9BA1_99463BB3E1D2.png"
o:title="element_diagram" />
</v:shape>
</w:pict>
</w:r>


I've saved the final *.doc to a WordML document to see the differences and
the corresponding block comes like this:

<w:r>
<w:pict>
<v:shape id="EAID_B71D14E2_41EF_4dde_9BA1_99463BB3E1D2"
o:spid="_x0000_i1025" style="width:180pt;height:112.5pt;visibility:visible"
coordsize="21600,21600" o:spt="100" adj="0,,0" path="">
<v:stroke joinstyle="miter"/>
<v:imagedata src="../Local%20Settings/Temp/element_diagram"/>
<v:formulas/>
<v:path o:connecttype="segments"/>
</v:shape>
</w:pict>
</w:r>

Now, does anyone knows why the w:binData node disappeared and why is the src
attribute of v:imagedata pointing to a location that doesn't exist??

The result is the same both with InsertFile and InsertXML methods and I
don't quite understand what's happening here...

Any clues?

Regards.
 

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