Pages: 1
RSS
How to use a newline character in a template
 
I'm working on this print template (numbered here for reference):

1 To: %TOlist
2 %IF:%CClist<>"":"cc: "%CClist
3 From: %FROMNAME <%FROMADDR>
4 Subject: %SUBJ
5 Date: %ODATE

The problem here is that line 2 shows as a blank line if no cc: addresses exist.  Mashing in the regex character '\n' just for illustration, this is what I'm aiming for:

1 To: %TOlist %IF:%CClist<>"":"\ncc: "%CClist
2 From: %FROMNAME <%FROMADDR>
3 Subject: %SUBJ
4 Date: %ODATE

Is there some variable I can use in place of '\n', or some other way to handle this?

Many thanks for any suggestions!
 
Try this:

To: %TOlist %IF:%CClist<>"":"
cc: "%CClist
From: %FROMNAME <%FROMADDR>
Subject: %SUBJ
Date: %ODATE
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
 
Isn't the macro %NEWLINE what you need? It has an optional parameter to return the number of emply lines, e.g. %NEWLINE(5) or %NEWLINE="5" returns 5 empty lines.
Pages: 1