Word-Attain again!

Hello all, Making a Word quote out of Navision Attain like the attachment functionality seemed to be no problem. Until I wanted to merge (all)the quote lines in my template; It is, logically, not possible to define mergefields like: “salesline.No.” line 10000 and the next Word line:“salesline.No.” line 20000 and further. A template based on one record like segments is easy but a main-sub layout demands more thinking. Does anybody know how I can do this or has anybody made something like this before? Gr, Justin