Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rtf to text format
Message
From
25/08/2006 11:37:19
 
 
To
24/08/2006 16:50:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01148376
Message ID:
01148587
Views:
25
Create a visual class based on the OLEControl object type and select the Microsoft RichText Control. Save the visual class. Then in code:
LOCAL lcMyRTFText, loRTF
lcMyRTFText = FILETOSTR("RTFFile.rtf")
loRTF = NEWOBJECT("RTFObject","RTFClass.vcx")
loRTF.TextRTF = lcMyRTFText
lcText = loRTF.Text
loRTF = .NULL.
The first line reads the RTF file into a string variable. The second line creates an instance of the class in memory. The third line assigns the RTF formatted text to the control. The fourth line extracts the text as plain text. Then last is to release the object from memory.
Previous
Reply
Map
View

Click here to load this message in the networking platform