Much has been written about the conversion of InfoPath forms to Word documents, but it remains challenging to come up with one solution that fits all needs.
David Gerhardt of 3Sharp has come up with a different approach to the problem – an approach which I’ve also thought of and which I’ve been meaning to write about for quite some time now.
So instead of putting more of the same content out on the Internet, I would like to point you to David’s excellent blog post, which makes use of the System.IO.Packaging namespace to generate a DOCX file for an InfoPath form: Converting an InfoPath 2007 Form into a Word 2007 Document.
Before you venture off into XSLT-land, which can be quite challenging for any developer, have a look at the solution above.
And if you are looking for the two InfoPath to Word conversion solutions that I wrote about, here they are:
- Convert an InfoPath form into a Word 2003 document and send this as an attachment in an e-mail
- Convert an InfoPath 2007 form into a Word 2007 document using XSLT and C#
Each InfoPath to Word conversion method has its own caveats and limitations, but at least you’ll have a choice when it comes to converting the XML of your InfoPath forms to Word documents.
Update 19 Dec 2008:
I just published the following InfoPath to Word conversion article if you are interested in converting or exporting rich text data from your InfoPath from to a DOCX file: Programmatically convert Rich Text data from InfoPath to Word DOCX.
Update 9 Jan 2009:
If you’re looking for yet another option for converting InfoPath forms to Word documents, I published an article about how you can use the OpenXML SDK 2.0 to do the conversion: Using the Open XML Format SDK 2.0 to convert an InfoPath form into a DOCX file.
