Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String manipulation question
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
String manipulation question
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01510681
Message ID:
01510681
Vues:
114
I'm using a list of keywords/bookmarks to update content in HTML and DOC files. Most of the keywords represent a single piece of data like a name or a value. However there are a few that are multiline values such as addresses which contain CHR(13) values.

Spinning thru the list of bookmarks, the text substitution is performed using something like ....
lcFindText = ALLTRIM(bookmarks.markname)
lcReplaceText = EVALUATE(bookmarks.cField)
ln = thisform.TXTextControl1.Find("&lcFindText",0,16)
IF ln > 0
     thisform.TXTextControl1.setfocus()
     thisform.TXTextControl1.SelText="&lcReplaceText"
ENDIF
All is fine unless a value with a carriage return is contained in the replacement text. Have tried using [lcReplaceText] but it too errors (with "Command contains unrecognized phrase/keyword").

Using the following avoids the error but those multi-line values are shown on a single line. Was trying to maintain those multiline bookmark values.
thisform.TXTextControl1.SelText=(lcReplaceText)
or...
thisform.TXTextControl1.SelText=lcReplaceText
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform