Hello Don, An archeological dig discovered that on Saturday, August 10, 2002 at 9:57 AM, Don Taylor [DT] typed the following:
DT> But all I get is the newline, and none of the attachment text. How DT> can I accomplish the substitution? Use a recursive template and a driver template. I've included two such templates below. Note the recursive template is called recipient2, this template was originally designed to reformat the output of %TOLIST, %CCLIST or %BCCLIST, but it also works with %ATTACHMENTS. ====[Driver Template]===== %COMMENT='%- %-%-%IF:"%ATTACHMENTS"<>"":"%ATTACHMENTS; "'%- %QINCLUDE='recipient2'%- %Comment='' ====[ End QT ]===== ====[recipient2 Template]===== %REM=' Recipient List reformating routine. recipient2 = recursive engine QT Written by Januk Aggarwal June 2002 '%- %- %IF:'%- %SETPATTREGEXP=$(?i)^(\"?(.*?)\"?\s*(\<.*?\>)?\s*[;,]\s*)?$%- %REGEXPMATCH=$%COMMENT$'<>'':'%- %- %SETPATTREGEXP=$(?i)^(\"?(.*?)\"?\s*(\<.*?\>)?\s*[;,]\s*)?$%- %REGEXPBLINDMATCH=$%COMMENT$%- %SUBPATT=$2$ %- %COMMENT=_%- %-%-%SETPATTREGEXP=$(?i)^(\"?(.*?)\"?\s*(\<.*?\>)?\s*[;,]\s*)?(.*)$%- %-%-%REGEXPBLINDMATCH=$%COMMENT$%- %-%-%SUBPATT=$4$_%- %- %QINCLUDE="recipient2"'%- ====[ End QT ]===== -- Thanks for writing, Januk Aggarwal This almost blank page was intentional. ________________________________________________________ Current version is 1.61 | "Using TBUDL" information: http://www.silverstones.com/thebat/TBUDLInfo.html