Hi
I am testing your article @
http://www.bizsupportonline.net/infopath2007/convert-infopath-form-into-word-2007-document-xslt-c-sharp.htm.
It describes almost the same problem I have to solve.
The only problem I have is after transormation I get quite always (not always) this message:
"**.docx cannot be opened because there are problems with contents."
I checked the /word/document.xml file, the one that is corrupt and saw that at the END (after
</w:document>) of the file the file "repeats" a short part of itself.
here an example:
"
</w:body> </w:document>" w:rsidRDefault="00387E8C" w:rsidP="00464A4B"><w:r w:rsidRPr="008E453E"> <w:fldChar w:fldCharType="begin"/> </w:r><w:r w:rsidRPr="008E453E"> <w:instrText>MACROBUTTON NoMacro [Hier klicken und Beilagen eingeben]</w:instrText> </w:r><w:r w:rsidRPr="008E453E">
<w:fldChar w:fldCharType="end"/>
</w:r></w:p></w:tc></w:tr></w:tbl><w:p w:rsidR="00387E8C" w:rsidRPr="008E453E" w:rsidRDefault="00387E8C" w:rsidP="00387E8C"/><w:p w:rsidR="00477C3F" w:rsidRPr="008E453E" w:rsidRDefault="00477C3F" w:rsidP="00387E8C"/><w:sectPr w:rsidR="00477C3F" w:rsidRPr="008E453E"> <w:headerReference w:type="default" r:id="rId9"/> <w:footerReference w:type="default" r:id="rId10"/> <w:headerReference w:type="first" r:id="rId11"/> <w:footerReference w:type="first" r:id="rId12"/> <w:pgSz w:w="11906" w:h="16838" w:code="9"/> <w:pgMar w:top="2835" w:right="1134" w:bottom="1418" w:left="1701" w:header="851" w:footer="794" w:gutter="0"/>
<w:cols w:space="708"/>
<w:titlePg/> <w:docGrid w:linePitch="360"/>
</w:sectPr></w:body></w:document>
"
Did I something wrong with the XSL file?
The Word template I'm using has some form fields, thas will be replaced during transformation.
So what I did is the "replace" in the XSL the "big" form field part with a simple "<xsl:value-of select="/my:..."
Thank a lot for your support!
Ciaooo