View Single Post
 
Old 12-14-2021, 08:49 AM
bananapple bananapple is offline Windows 10 Office 2019
Novice
 
Join Date: Dec 2021
Posts: 6
bananapple is on a distinguished road
Default

Thanks for the tip! Sorry if I came across a little presumptuous, it's the first time I post here.

I downloaded the add-in, let me try again following your indications.

I've written the following field code which groups data from multiple rows:

We have the following information on Employee { MERGEFIELD "Employee" }
{ MERGEFIELD Employee_ID } - { MERGEFIELD Description } { SET ID1"{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }
{ NEXTIF { MERGEFIELD Employee } = { MERGEFIELD Employee_Compare } }{ SET ID2 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ IF ID1 = ID2 "" "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ SET ID1 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }
{ NEXTIF { MERGEFIELD Employee } = { MERGEFIELD Employee_Compare } }{ SET ID2 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ IF ID1 = ID2 "" "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ SET ID1 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }
{ NEXTIF { MERGEFIELD Employee } = { MERGEFIELD Employee_Compare } }{ SET ID2 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ IF ID1 = ID2 "" "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ SET ID1 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }
{ NEXTIF { MERGEFIELD Employee } = { MERGEFIELD Employee_Compare } }{ SET ID2 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ IF ID1 = ID2 "" "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ SET ID1 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }
{ NEXTIF { MERGEFIELD Employee } = { MERGEFIELD Employee_Compare } }{ SET ID2 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ IF ID1 = ID2 "" "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }{ SET ID1 "{ MERGEFIELD Employee_ID } - { MERGEFIELD Description }" }


As expected it provides the following output for Preview Results 1 is:

We have the following information on Employee Claire
A - Blue
B - Green
C - Yellow


So far this is perfect. The challenge I can't seem to solve is repeating this output a second time in the same word document. Copy pasting the same field code later in the word document doesn't work. I've also tried to solve this by modifying the excel database but I can't seem to get that to work correctly either. My Target output for Preview Results 1 is as follows:

We have the following information on Employee Claire
A - Blue
B - Green
C - Yellow

Here is the same information again
A - Blue
B - Green
C - Yellow


Please let me know if you have any ideas on how I can get this to work properly
Reply With Quote