Since I couldn't find a step by step on how to add HTML to a Word Doc (DOCX - Open XML) in 2007 programatically; I decided to write one.
Here's a revised copy of
myDoc.zip which is a complete version of what the OP is trying to get working, with the twist that it's complete, and works. So, if you want to see a very simple sample that uses HTML to populate the documents body, check that out.
In my case, I had a client that wanted to attach a Header, Footer and Watermark to reports I was generating with HTML, in Word. So, I started by finalizing the Header, Footer and Water mark with them, and creating a Word Doc that had ONLY that Header, Footer and Watermark on it. A Template, of sorts.
Then, I saved that as a Word 2007 doc (.docx), unzipped it, and started working.
The changes I made are below,
in red.
TemplateDoc/[Content_Types].xml<Types>
<Default Extension="xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
<Default Extension="html" ContentType="text/html"/><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
</Types>
NEW FILE : TemplateDoc/word/test.html<html>
<head>
<title>tourisme</title>
</head>
<body>
Hello
</body>
</html>TemplateDoc/word/_rels/document.xml.rels<?xml version="1.0" encoding="utf-8"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Id="rId1000" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk" Target="test.html"/></Relationships>
TemplateDoc/word/document.xml (At the location where I wanted my HTML)
<w:body>
<w:altChunk r:id="rId1000" /> </w:body>
Then, I zipped the contents of TemplateDoc, changed the extension to .docx and opened it with Word... BAM! My HTML contents are in the body of the document, and the headers, footers and watermark are still in tact!
Director of Technology
Express Dynamics, the WorkXpress company
http://www.workxpress.com