Here's a version that starts with a large indent and decreases for each
subsequent line, and which can take fields or rules for each line:
function Repeat(s, n)
{
var out = "";
for (var i = 0; i < n; i++)
out += s;
return out;
}
function IndentedLine(content, indent)
{
if (!content)
return "";
return Repeat("<t>", indent) +
NormalizeEntities(content) + "<br>\n";
}
function ReverseIndentedLines()
{
//var maxIndent = 8;
var maxIndent = -1;
for (var i = 0; i < arguments.length; i++)
if (arguments[i])
maxIndent++;
var s = "";
for (var i = 0; i < arguments.length; i++)
if (arguments[i])
s += IndentedLine(arguments[i], maxIndent--);
return s;
}
return ReverseIndentedLines(Field("FName"),
Field("LName"), Rule("Salutation"),
Rule("Age"), Field("Add1"), Field("Add2"),
Field("City"), Field("State"), Field("Zip"));
Just replace the fields and rules at the end with whatever you have in
your job.
If you always want to start with the same level of indent on the first
line, that's even easier. You can just hard-code that in the
ReverseIndentedFieldLines function, like so:
function ReverseIndentedLines()
{
var maxIndent = 8;
var s = "";
for (var i = 0; i < arguments.length; i++)
if (arguments[i])
s += IndentedLine(arguments[i], maxIndent--);
return s;
}
And the rest of the rule is the same.
Dan
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!
Variable text on a curve and soft drop-shadows for variable text
LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade
New licenses available for $599 each at:
http://fusionpro.printable.com/store/
All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
Users of FusionPro Desktop have unlimited free email support. Contact Printable
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm
--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--
--
Note: All e-mail sent to or from this address will be received or otherwise
recorded by the e-mail recipients of this forum. It is subject to archival,
monitoring or review by, and/or disclosure to someone other than the recipient.
Our privacy policy is posted on www.printplanet.com
--