Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rtf to text format
Message
De
25/08/2006 11:37:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01148376
Message ID:
01148587
Vues:
24
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform