0

I need to call local images in openXML and convert XML to Word with those images using XSLT, I would like to insert the images directly instead of calling in document_rels file.

I used the below tag to call the image 'blue_hills.jpg in C' drive

   <w:pict>
    <v:shape id="_x0000_i1025" type="#_x0000_t75" style="width:250; height:200">
     <v:imagedata src="c:\Blue_hills.jpg"/>
    </v:shape>
   </w:pict>

Any assistance would be greatly appreciated.

VSe
  • 919
  • 2
  • 13
  • 29

1 Answers1

0

You cant do it that way. Images are converted to binary and added as a image part to document. The attribute src for imagedata in your XML is invalid. It just stores the relationship id for the image part.

This link explains the Open XML for document with image.

Here is an example to insert image programmatically.

Kiru
  • 3,489
  • 1
  • 25
  • 46