Y
Yves Dhondt
Hello,
I have a HTML file with an XML file inside containing WordML. When I try to
insert the file, the xml seems to be stripped out of the file and nothing
from inside the XML gets inserted. However, normal HTML paragraphs do get
inserted.
As I have no option but to use HTML, is there a way I can incorporate WordML
in there in a way that Word can actually process it?
TIA,
Yves
Code to insert the HTML file:
ActiveDocument.Range.InsertFile "test.html"
Example HTML file:
<html xmlns="http://www.w3.org/TR/REC-html40">
<head></head>
<body>
<xml id="SomeId">
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
<w>
<wPr/>
<w:r>
<w:rPr>
<w:u/>
</w:rPr>
<w:t xml:space="preserve">Hello</w:t>
</w:r>
<w:r>
<w:rPr/>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r>
<w:rPr>
<w:b/>
</w:rPr>
<w:t>World</w:t>
</w:r>
<w:r>
<w:rPr/>
<w:t>!</w:t>
</w:r>
</w>
</w:wordDocument>
</xml>
</body>
</html>
I have a HTML file with an XML file inside containing WordML. When I try to
insert the file, the xml seems to be stripped out of the file and nothing
from inside the XML gets inserted. However, normal HTML paragraphs do get
inserted.
As I have no option but to use HTML, is there a way I can incorporate WordML
in there in a way that Word can actually process it?
TIA,
Yves
Code to insert the HTML file:
ActiveDocument.Range.InsertFile "test.html"
Example HTML file:
<html xmlns="http://www.w3.org/TR/REC-html40">
<head></head>
<body>
<xml id="SomeId">
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
<w>
<wPr/>
<w:r>
<w:rPr>
<w:u/>
</w:rPr>
<w:t xml:space="preserve">Hello</w:t>
</w:r>
<w:r>
<w:rPr/>
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r>
<w:rPr>
<w:b/>
</w:rPr>
<w:t>World</w:t>
</w:r>
<w:r>
<w:rPr/>
<w:t>!</w:t>
</w:r>
</w>
</w:wordDocument>
</xml>
</body>
</html>