I have seen samples using Word 9.0 object library. But I have Office 2010 Beta and .NET 4.0 in VS2010. Any tips on how to go with the new Word Dlls?
So I just wanted to get the functionality of RTF to TEXT with .NET3.5 or later.
I got a better solution with WPF , using TextRange.
FlowDocument document = new FlowDocument();
//Read the file stream to a Byte array 'data'
TextRange txtRange = null;
using (MemoryStream stream = new MemoryStream(data))
{
// create a TextRange around the entire document
txtRange = new TextRange(document.ContentStart, document.ContentEnd);
txtRange.Load(stream, DataFormats.Rtf);
}
Now you can see the extracted text inside documentTextRange.Text
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With