Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TEXTMERGE question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00630433
Message ID:
00630634
Vues:
19
>>Hello
>>
>>I have some difficulties to figure out how to do the following operation (it is probably simple but I don't see it):
>>
>>I have a web page in a variable. This page has stuff like
<<lname>>
and I want to replace this with the content of the variable lname.
>>So the first think I did was a mystr=FILETOSTR("mypage.html"). Ok now I have my web page in my variable.
>>But how can I apply the textmerge on this variable and keep the result in it ?
>>Example:
>>
var1="<hml>Hello <<lname>> !</html>"
>>after the magic:
>>var1="<html>Hello Eric !</html>"
>>
>>Thanks
>>Eric
>
>In this case, I use STRTRAN():
>
>
>mystr=FILETOSTR("mypage.html")
>mystr=STRTRAN(mystr,"<<lname>>",lname)
>
>
>HTH :-)

Finaly, it seems that the function myvar=textmerge(myvar) will do the job. THe only bad thing is that it fails if one of the variable is not existing.
Eric Crespin
Consultant
PC PLUS Software Inc.
www.pcplus.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform