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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rtf to plain text

Status
Not open for further replies.

mexicali2

Programmer
Jun 1, 2007
14
MX
hi there... i have a rtf control to store text with bold, italics, color etc.... works fine to send it to word... but what if i want to view or print as VFP report?? i have all the codes among with text.... how erase all rtf's codes and leave only the text???... of course i plan copy the original and edit the copy....

tnx
 
after all night wake up and dont find the solution i make this and. works fine!!!
1st i make an olertfcontrol with the visible property off
(this for the user dont look the process he only want the result not how i do it jejeje)
2nd i make a command button with this click event
select dbftable
go record with rtf
larg=len(alltrim(memofield))
thisform.refresh
thisform.olertf.setfocus
thisform.olertf.selstart=0
thisform.olertf.sellength=larg
xyz=thisform.olertf.seltext
set safety off
strtofile(esto,"nocodes.txt")
set safety on

presto!!!
now you can use nocodes.txt file to import in a nwe memo field or cursor or wahtever you want and print in a vfp report

 
oopss sorry the line:
strtofile(esto,"nocodes.txt")
must be
strtofile(xyz,"nocodes.txt")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top