Well, the second technique I suggested does not use macros, just Word
fields. So if you want to try that, you can start as follows:
a. create a new blank mail merge main document and connect it to your data
source.
b. in that document, use ctrl-F9 to insert a pair of the special field code
braces. In the following instructions, use Alt-F9 as necessary to redisplay
all the braces and field codes if they disappear
{ }
c. click between the { } and type IF > 0 "" to give you
{ IF > 0 "" }
d. click after "IF " and use ctrl-F9 to insert another pair of braces:
{ IF { } > 0 "" }
e. click between the "" and use ctrl-F9 to insert another pair of braces:
{ IF { } > 0 "{ }" }
f. type MERGEFIELD Quantity between the first inner pair of braces (but use
whatever field name you need, rather than "Quantity")
{ IF { MERGEFIELD Quantity } > 0 "{ }" }
g. type MERGEFIELD IDNumber between the second inner pair of braces (but
use whatever field name you need, rather than "IDNumber")
{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }" }
h. Click immediately before that final double-quote ", and press the Enter
key (i.e. the one that would normally give you a new paragraph in Word:
{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }
" }
i. Select that bunch of fields, Edit|Copy, click after the closing brace,
and Edit|Paste:
{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }
" }{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }
" }
j. Repeat that as many times as you need to cope with the maximum number of
copies you are considering. e.g. if it's 4 you need
{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }
" }{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }
" }{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }
" }{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }
" }
k. modify those 0s so you have 0,1,2,3 (etc.)
{ IF { MERGEFIELD Quantity } > 0 "{ MERGEFIELD IDNumber }
" }{ IF { MERGEFIELD Quantity } > 1 "{ MERGEFIELD IDNumber }
" }{ IF { MERGEFIELD Quantity } > 2 "{ MERGEFIELD IDNumber }
" }{ IF { MERGEFIELD Quantity } > 3 "{ MERGEFIELD IDNumber }
" }
Merge to a new document...