To save a text document to a file you need to call the NRichTextView object SaveToFile method:
Saving a Text Document To File |
Copy Code
|
---|---|
m_RichText.SaveToFile(@"C:\\MyDocument.docx");
|
By default, the NOV rich text view analyzes the extension of the provided file name to determine the format to save to. If you want to specify the text format explicitly you can pass it as a second parameter to the SaveToFile method:
Saving a Text Document To File Specifying the Text Format Explicitely |
Copy Code
|
---|---|
m_RichText.SaveToFile(@"C:\\MyDocument.docx", NTextFormat.Docx);
|