Search code examples
c#wpfflowdocumentdocx

Converting docx files to WPF Flow Documents


I'm trying to convert a bunch of Microsoft Word documents, containing a few pictures and many lines of text and headings to Flow Documents.

I found this article useful, but I couldn't add images form docx files to Flow Documents properly.

A sample code or some guidance would be appreciated.


Solution

  • This is one of the more popular converters: Word to XAML Converter. It ain't perfect, but it's a great start. There's also a good article on this subject at OpenXML + FlowDocument = OpenFlowDocument? which is for WPF. Finally, you can check out TextGlow - although it's for Silverlight and not using FlowDocument, it's good to see how he does some of the conversions with Linq.