Board index » delphi » Save formatted text from RichEdit to rtf-file
Klas Westholm
![]() Delphi Developer |
Sun, 06 Nov 2005 20:03:58 GMT
|
Klas Westholm
![]() Delphi Developer |
Sun, 06 Nov 2005 20:03:58 GMT
Save formatted text from RichEdit to rtf-file
Hello!
I hope you can help me with this. I want to save text that is formatted Thanks in advance, -- |
Ian Kir
![]() Delphi Developer |
Sun, 06 Nov 2005 21:33:29 GMT
Re:Save formatted text from RichEdit to rtf-fileQuote"Klas Westholm" <Klas.Westh...@telia.com> wrote in message Quote> Hello! HTH, |
Klas Westhol
![]() Delphi Developer |
Mon, 07 Nov 2005 16:42:10 GMT
Re:Save formatted text from RichEdit to rtf-fileSorry, but it didn't work. I had this setting before. Do you have any other suggestions? Yours, -- Quote> "Klas Westholm" <Klas.Westh...@telia.com> wrote in message |
Ian Kir
![]() Delphi Developer |
Mon, 07 Nov 2005 17:38:01 GMT
Re:Save formatted text from RichEdit to rtf-fileQuote> E-post: Klas.Westh...@datakatten.se Quote> > only Coming back to the problem in hand, I've just created a new default app, procedure TForm1.FormCreate(Sender: TObject); RichEdit1.SelAttributes.Style := [fsBold] ; RichEdit1.SelAttributes.Style := [] ; RichEdit1.Lines.SaveToFile('C:\Test.rtf'); Run the program, checked the contents of C:\Test.rtf and it held: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil MS Sans Serif;}} Can you try doing the same? If you get non-RTF in your Test.rtf there's HTH, |
Mike Mannin
![]() Delphi Developer |
Mon, 07 Nov 2005 19:08:25 GMT
Re:Save formatted text from RichEdit to rtf-fileKlas If Ian's suggestion doesn't work on your machine for some reason try this: Copy the contents of the richedit to a TMemorystream As far as I know, both Ian's suggestion and the above should save the RTF Mike Quote"Klas Westholm" <Klas.Westh...@telia.com> wrote in message Quote> Sorry, but it didn't work. I had this setting before. Do you have any - Hide quoted text - - Show quoted text - Quote> > only |
Klas Westhol
![]() Delphi Developer |
Fri, 11 Nov 2005 17:41:38 GMT
Re:Save formatted text from RichEdit to rtf-fileThank you Mike and Ian! Both suggestions worked with RichEdit. Now a new question: I want to do the same with a DBRichEdit. I can change the text alright Yours, Quote> Klas |
Klas Westhol
![]() Delphi Developer |
Sat, 12 Nov 2005 03:36:36 GMT
Re:Save formatted text from RichEdit to rtf-fileThank you Mike and Ian! Both suggestions worked with RichEdit. Now a new question: I want to do the same with a DBRichEdit. I can change the text alright Yours, Quote> If Ian's suggestion doesn't work on your machine for some reason try this: formatted Quote> > > froom a RichEdit or DBRichEdit to a rtf-file. Quote> > only Coming back to the problem in hand, I've just created a new default app, procedure TForm1.FormCreate(Sender: TObject); RichEdit1.SelAttributes.Style := [fsBold] ; RichEdit1.SelAttributes.Style := [] ; RichEdit1.Lines.SaveToFile('C:\Test.rtf'); Run the program, checked the contents of C:\Test.rtf and it held: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil MS Sans Serif;}} Can you try doing the same? If you get non-RTF in your Test.rtf there's HTH, -- |
1. Save formatted text from DBRichEdit to rtf-file
2. Saving formatted text from a DBRichEdit to a rtf-file
3. How to save a richedit text (with formatting) in a Paradox-Database field (blob field)
4. How to save a richedit text (with formatting) in a Paradox-Database field (blob field)
5. RichEdit, Saving selected text with formatting
6. D7 - saving text from DBRichEdit to rtf-file
7. Saving MS Word files / Bmp files/ text / rich text files in SQL Server
8. Function which converts a file of Word format into format rtf