Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 To: Arvin Mendoza
  Where is Arvin Mendoza?
 The Fort
 Philippines
 Arvin Mendoza
 Tags
Subject: RE: TXT to RTF format
Thread ID: 228748 Message ID: 228882 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 Category: Active X Controls & OLE Automation
Date: Friday, May 22, 2009 12:15:42 PM         
   


> Dear Friends,
>
> I need you help!
>
> How to convert a simple text file into an RTF format? I have a memo field and I want to convert the content with RTF tags.
>
> Sample text: THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG NEAR THE BANK OF THE RIVER.
>
>
> Thank you very much!
>
> Regards,
>
>
> Arvin P. Mendoza
> MCMXIV,Mizrach

for converting any string as you said to TXT/RTF format try this code
TEXT TO myvar noshow
a	eezrrerere
aezrzrzrezrezr
eazaerzrzr
aezrzrzrzerezrtetetretrrryr
rtytuyiuoiuoiu
ENDTEXT

oRichText = CreateObject("RichText.RichtextCtrl.1")
oRichText.TextRTF = myvar
oRichText.savefile("c:\mytxt.txt",1)   &&txt  
run/n "notepad" c:\mytxt.txt  &&show


oRichText.savefile("c:\myrtf.rtf",0)   &&rtf
&&show in associated application (word)
DECLARE INTEGER ShellExecute IN shell32.dll ; 
  INTEGER hndWin, STRING cAction, STRING cFileName, ; 
  STRING cParams, STRING cDir, INTEGER nShowWin

ShellExecute(0,"open","c:\myrtf.rtf","","",1)







Dont rate please.its only for the pleasure to help.Give me only a feed back.
Yousfi Benameur

ENTIRE THREAD

TXT to RTF format Posted by Arvin Mendoza @ 5/21/2009 9:42:29 AM
RE: TXT to RTF format Posted by Ammar Hadi @ 5/21/2009 11:10:23 AM
RE: TXT to RTF format Posted by Yousfi Benameur @ 5/22/2009 10:07:55 AM
RE: TXT to RTF format Posted by Yousfi Benameur @ 5/22/2009 12:15:42 PM