Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TEXTMERGE question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00630433
Message ID:
00630634
Views:
18
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform