I use this method to get plain text
procedure TMainForm.O1Click(Sender: TObject); begin if sOpenDialog1.Execute then sRichEdit1.Lines.LoadFromFile(sOpenDialog1.FileName); sMemo1.Text := sRichEdit1.Text; sRichEdit1.Clear; sRichEdit1.Text := sMemo1.Text;
to save the file you have the choice to save as .txt the text is still in the memo, but all the changes you made will only be in richedit, so you will need to move the text to the memo after all your changes are done, and then save it from the memo
save as .rtf just save it from richedit Hope this helps you.
source share