I have tried to follow the various tutorials on merging to a Directory and I am not even close to getting it to work.
I am using Word 2003.
I am trying to make the example work so that I properly understand what is going on, therefore, I have copied the MS excel data file in the "How to Set Up the Data File" example and used ctrl+F9 to set up the field braces
I have simply put the text "The data you want" before the merge fields. I put the merge fields on the document and copied them into the code to ensure there were no typos (I noticed that Word 2003 puts the field in quotation marks)
When I merge to a new document, instead of the data coming through sorted i.e.
"The data you want
Atlanta
Smith £3000
Gates $50000" etc
I get
"The data you want
Atlanta
Smith £3000
The data you want
Gates $50000" etc
Which suggests to me that it is partially 'sorting' the data, but I do not know why it is not inserting the data for related records all beneath the city? What am I doing wrong?
I am using Word 2003.
I am trying to make the example work so that I properly understand what is going on, therefore, I have copied the MS excel data file in the "How to Set Up the Data File" example and used ctrl+F9 to set up the field braces
I have simply put the text "The data you want" before the merge fields. I put the merge fields on the document and copied them into the code to ensure there were no typos (I noticed that Word 2003 puts the field in quotation marks)
Code:
{ IF { MERGESEQ } = "1" "{ MERGEFIELD "CITY" }
" "" }{ SET Place1 { MERGEFIELD "CITY" }}
{ If { Place2 } <> { Place1 }"
{ MERGEFIELD "CITY" }
{ MERGEFIELD "EMPLOYEE" } { MERGEFIELD "SALES" }" "{ MERGEFIELD "EMPLOYEE" } { MERGEFIELD "SALES" }" }{ SET Place2 { MERGEFIELD "CITY" }}
When I merge to a new document, instead of the data coming through sorted i.e.
"The data you want
Atlanta
Smith £3000
Gates $50000" etc
I get
"The data you want
Atlanta
Smith £3000
The data you want
Gates $50000" etc
Which suggests to me that it is partially 'sorting' the data, but I do not know why it is not inserting the data for related records all beneath the city? What am I doing wrong?