Welcome to OpenXML Developer Sign in | Join | Help

How to upload content of a html or another docx file to a docx file in best way?

Last post 10-09-2008, 8:20 PM by neversaydie. 0 replies.
Sort Posts: Previous Next
  •  10-09-2008, 8:20 PM 3776

    How to upload content of a html or another docx file to a docx file in best way?

    •  Ideally I would try to put another docx to a docx. I tried using a html file as posted in other forum.

      I tried to do below steps:
      1. I created a very small docx file with 2/3 lines written using MSWord.
      2. Save it.
      3.Open the docx using xmlSpy.
      4. Add a html file under /word.
      5. Edit Contents.xml to have the new content type.  <Default Extension="htm" ContentType="application/html"/>
      6.Edit .rels file to include unique relationship
      <Relationship Id="rId1000" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk" Target="word/xxx.htm"/>
      7.Edit document.xml and add <w:altChunk r:id="rId1000"/> inside body node.
      8.Save the docx.

      Open the docx file and error in opening. I redo it. This time till step 4 and it does show "error in opening" error. Addition of a new part in the zipped package is not working at all in this straight way. Forget about any xml tag error.

      Can anybody throw an idea?

      Thank you.



    View as RSS news feed in XML

View as RSS news feed in XML