Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TextMerge with FileToStr and Macro Sub Problem
Message
De
13/02/2003 13:02:04
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00752784
Message ID:
00752799
Vues:
15
>I am trying to make a text file template, read it into a string, merge the contents with textmerge, and return the final string.
>
>Why would the below code not work?
>
>Thanks.
>
>
>Function MergeMe
>Lparameters aliasName as String , templateName as String
>	Local ;
>		xxxDbc as Exception , ;
>		outValue as String , ;
>		templateText as String
>	Local ;
>		mergeText as String
>	templateText = FileToStr( templateName )
>	? templateText + Chr(13)+Chr(10) +":"+Chr(13)+Chr(10)
>	Set TextMerge Delimiters To "{{" , "}}"
>*!*				set textmerge to MemVar mergeText
>*!*				set textmerge on
>*!*				   \\{{Datetime()}}
>*!*				   \
>*!*				set textmerge off
>*!*				set textmerge to
>	set textmerge to MemVar mergeText
>	set textmerge on
>	   \\&templateText
>	   \
>	set textmerge off
>	set textmerge to
>Return mergeText
>EndFunc
>
>
>textboxstring.template file contents:
>
>Datetime()
>
>
>Thanks.

Try :
\\{{eval(templateText)}}

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform