ok, here is an output file. First pages, second line The end is moving with the variable text.
This is what I have written:
var content = Field("D.O.B.");
var font = "ITC Avant Garde Std ELt Cn";
var pointSize = 8;
var frameName = "Rec DOB";
var line = ": ___________________________________";
return CopyfitLine(content, line, font, pointSize, FindTextFrame(frameName) .getsettableTextWidth() / 100.0, 2, true);
Thank you for your assistance. Voucher-Output.pdf