ComponentOne Word for WinForms
Working with Word for WinForms / Advanced Level Working / Reading and Writing RTF Files
In This Topic
    Reading and Writing RTF Files
    In This Topic

    Word component allows reading and writing word document with RTF Documents with Rich Text format (*.rtf) extension. You can use Load method to read a document and Save method to write a document as illustrated in the following code:

    ' load Word/RTF document
    Dim C1Word As New C1WordDocument()
    C1Word.Load(dlg.FileName)
    
    ' save RTF document
    C1Word.Save("sample.rtf")
    
    // load Word/RTF document
    C1WordDocument C1Word = new C1WordDocument();
    C1Word.Load(dlg.FileName);
     
    // save RTF document
    C1Word.Save("sample.rtf");