Hello,
in case someone needs formatted raw HTML to be included in DOCX.
Best regards,
Otto
Steps
Docx- file rename to Zip and unzip
Copy your MHT file to the word directory of the zip
Search for placeholder in document.xml and replace with
<w:altChunk r:id="htmlDoc" />
word/document.xml - main XML document containing reference to imported file ("w:altChunk" element)
altChunk (Anchor for Imported External Content)
This element specifies a location within a document for the insertion of the contents of a specified file containing external content to be imported into the main WordprocessingML document.
The altChunk element specifies that the external content targeted by the relationship with an ID of altChunk1 must be imported at the beginning of the document.
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk" Target="/word/htmlDoc.html" Id="htmlDoc" />
The corresponding relationship part item shows that the file to be imported is located next to the main document and is named import.htm. end example]
[Content_Types].xml - contains declaration of "altChunk" content type (mime type - "text/html"; mime type for MHTML is "message/rfc822"):
<Override PartName="/word/htmlDoc.html" ContentType="text/html"/>