Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to extract plain text from RTF 1

Status
Not open for further replies.

pikjuo

Programmer
Dec 12, 2000
12
LT
I have table with memo fields and RTF text inside (Like ..SOLUTIONS\OLE\RTF.SCX)

My questions:
1. How can i extract plain text from memo field?
2. How pick two or more memo field, concatenate and
use as one RTF control source?

Thank yuo all

Juozas
 
1. How can i extract plain text from memo field?

local cValue
SELECT myTable
store myTable.memo to cValue

2. How pick two or more memo field, concatenate and
use as one RTF control source?


Take a look at STRTOFILE in the help file. Copy your memos to a textfile and use that textfile as the source of the RTF activex.

 
Sorry, but memo fields contains text format characters and problem is to leave only text
 
Sorry I missread your question. You had mentionned "plain text".
 
Copy the memo to a text file and automate Word to open it and 'save as' plain text.

Brian
 

ThisForm.Olecontrol1.SaveFile('junk.txt',1)

this is the richtext box on your form Olecontrol1

('full path and file name',1)

0 = rtf format
1 = plain text
Attitude is Everything
 
Danceman,

Good idea, but the purpose is to use this converted memo as vfp report field or display inside grid

Juozas
 
this is what you are looking for:

thisform.text1.value = ThisForm.Olecontrol1.Text()

If you are working with none formated text why are you using FRTedit box, why not just use editbox?

ThisForm.Olecontrol1.Text()
will return all the text in the RTFbox in plain text format.

smooth sailing Attitude is Everything
 
Danceman,

i need edit text records with different fonts, colors, ...,so OLERTF is useful. But i dont know any way for reporting such records without saving to temp files and display such records with grid control

Juozas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top