Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RTF to plain text
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01397704
Message ID:
01397722
Vues:
62
Is there a way to determine if the RTF has no text without loading it into the MS RTF control?

I found that when the RTF control displays as empty, it stores this in the memo field:
{\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\fs24 
\par }
I am trying to achieve this:
Scan
	If !Empty(aa.notes) && RTF
		* Do something
	Endif
Endscan
aa.notes is not empty because of the RTF, but for my purposes it has no text so it should be regarded as empty.

Before I load each memo field into a MS RTF control as you suggest, is there a function that can determine if it has no text?

Cyril



>You can load RTF data into MS RTF control using TextRTF property and extract plain text from Text property.
>
>>Can one convert RTF to plain text programatically?
>>
>>example:
>>
>>
>>TEXT TO mRTF
>>{\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fnil\fcharset0 Arial;}}
>>{\colortbl ;\red0\green64\blue128;}
>>\viewkind4\uc1\pard\fs24 This is an \cf1\ul\b apple\cf0\ulnone\b0 .
>>\par }
>>ENDTEXT
>>
>>
>>
>>How can one get the text from the above programatically?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform