This project has moved. For the latest updates, please go here.

Is there a way to insert RTF-formatted text into a paragraph?

Mar 4, 2016 at 8:27 PM
Edited Mar 10, 2016 at 8:23 PM
Hello! I'm writing a WPF program to generate word documents. I'm running into an issue though.
I want users to be able to edit certain text which is later used in writing a word document. These people aint programmers and don't understand formatting tags (I wrote a custom tag system so I can store data in files between runs). So I have a WPF RichTextBox which allows for WYSIWYG editing.

The problem is that this text is formatted using RTF formatting and it's been a nightmare to deal with. I'm wondering if there is a way to input RTF-formatted text into the word document using novacode DocX. If not, does anyone have any easy way to convert RTF to just simple tags for things like alignment, bold, underline, italics, etc. I don't care about font family or size, that's taken care of in my document generator. If anyone could point me in the right direction that would be great.

Edit: Wrote a functional, but not very good rtf->tag converter. Fixed my issue.
Marked as answer by nihilbug on 3/10/2016 at 1:23 PM