RTF documents as templates

SparkOut SparkOutYNY at gmail.com
Mon Feb 21 08:56:52 EST 2011

Thanks Jan

I was actually doing this in a sort of dynamic way looping through fields in
the stack to make the variables on the fly, and hence not declared them. As
soon as I added a line:

do "local" && tMergeFieldName

it started working well.

I obviously wasn't doing something right because having revisited my code
anyway to make the variables with :

do "put field" && tField && "of card" && tCard && "of this stack into" &&

it works, even without pre-declaring the variable. If the field is empty,
then the variable is created with the content empty as well. So this is much

I don't suppose there is any way to have the merge operation delete any
undeclared placeholders though is there? If I have a generic template
document that may have (for example) 3 sections, but only 2 sections
declared in the dynamic generation, is there a method for having the output
document drop the unused placeholders? Some jiggery-pokery with regex before
output I suppose?

View this message in context: http://runtime-revolution.278305.n4.nabble.com/RTF-documents-as-templates-tp322967p3317365.html
Sent from the Revolution - User mailing list archive at Nabble.com.

More information about the Use-livecode mailing list