Hi, thank you for your answers, When I embed the same document using word, this code is added on document.xml :
<w:p w:rsidR="007E79B2" w:rsidRDefault="00667FD6"> <w:r> <w:object w:dxaOrig="1551" w:dyaOrig="991"> <v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype> <v:shape id="_x0000_i1025" type="#_x0000_t75" style="width:77.25pt;height:49.5pt" o:ole=""> <v:imagedata r:id="rId5" o:title=""/> </v:shape> <o:OLEObject Type="Embed" ProgID="Package" ShapeID="_x0000_i1025" DrawAspect="Icon" ObjectID="_1523798483" r:id="rId6"/> </w:object> </w:r> </w:p> With my code using Apache POI, I've managed to create the embed file, but nothing is added on document.xml. It just create the correct content type, partname and relationship (see my code). So I want to insert this code into document.xml, changing the attribute r:id of <o:OLEObject> and <v:imagedata> by the id of my text file and my picture. Best regards. 2016-05-25 21:23 GMT+02:00 Murphy, Mark <murphym...@metalexmfg.com>: > I don't know the answer to your question, but what happens when you try to > embed the same document using Word? What does the XML look like? What does > the XML look like when you try to embed it with POI? Give us a minimal > example of the problem so we can easily see what is happening. Then someone > may be able to help you. > > -----Original Message----- > From: marc yet [mailto:deflot....@gmail.com] > Sent: Wednesday, May 25, 2016 11:15 AM > To: user@poi.apache.org > Subject: Re: Display embedded files on the document (.docx) > > Up > does someone have a solution ? I'm really stuck. :/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@poi.apache.org > For additional commands, e-mail: user-h...@poi.apache.org >