Home |
Search |
Today's Posts |
#1
|
|||
|
|||
grouping and page breaks in a merge
I am trying to get a mail merge to put city into a table, show all records
for the city into a second table on the same page and then start a new page whenever the city changes. I tried to use the following code from Microsoft KB but it does not work: { If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶ " ""}{ SET Place1 { MERGEFIELD CITY }}¶ { If { Place2 } { Place1 }"¶ ----------------------------Page Break-------------------------------- { MERGEFIELD CITY }¶ ¶ { MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}¶ I pasted the code as if from Microsoft's website becuase I could not figure out out to create the formulas. |
#2
|
|||
|
|||
You cannot paste fields from a KB article, you have to recreate them using
CTRL+F9 for each pair of field boundaries {} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: I am trying to get a mail merge to put city into a table, show all records for the city into a second table on the same page and then start a new page whenever the city changes. I tried to use the following code from Microsoft KB but it does not work: { If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶ " ""}{ SET Place1 { MERGEFIELD CITY }}¶ { If { Place2 } { Place1 }"¶ ----------------------------Page Break-------------------------------- { MERGEFIELD CITY }¶ ¶ { MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}¶ I pasted the code as if from Microsoft's website becuase I could not figure out out to create the formulas. |
#3
|
|||
|
|||
I can get Word to create the brackets using CRTL F9 but I can't seem to get
it to create the expression inside the brackets as follows: { If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶ "Graham Mayor" wrote: You cannot paste fields from a KB article, you have to recreate them using CTRL+F9 for each pair of field boundaries {} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: I am trying to get a mail merge to put city into a table, show all records for the city into a second table on the same page and then start a new page whenever the city changes. I tried to use the following code from Microsoft KB but it does not work: { If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶ " ""}{ SET Place1 { MERGEFIELD CITY }}¶ { If { Place2 } { Place1 }"¶ ----------------------------Page Break-------------------------------- { MERGEFIELD CITY }¶ ¶ { MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}¶ I pasted the code as if from Microsoft's website becuase I could not figure out out to create the formulas. |
#4
|
|||
|
|||
What you have here is part of a field sequence (which continues on the line
you have not pasted). The pilcrow '¶' merely indicates that you should press the enter key at that point. The rest you will have to type between the field brackets. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: I can get Word to create the brackets using CRTL F9 but I can't seem to get it to create the expression inside the brackets as follows: { If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶ "Graham Mayor" wrote: You cannot paste fields from a KB article, you have to recreate them using CTRL+F9 for each pair of field boundaries {} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: I am trying to get a mail merge to put city into a table, show all records for the city into a second table on the same page and then start a new page whenever the city changes. I tried to use the following code from Microsoft KB but it does not work: { If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶ " ""}{ SET Place1 { MERGEFIELD CITY }}¶ { If { Place2 } { Place1 }"¶ ----------------------------Page Break-------------------------------- { MERGEFIELD CITY }¶ ¶ { MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}¶ I pasted the code as if from Microsoft's website becuase I could not figure out out to create the formulas. |
#5
|
|||
|
|||
Select each portion of the text that you want enclosed in field delimiters and Press Ctrl + F9 or use Ctrl + F9 to insert each pair of empty field delimiters and then use the keybaord to create the required expression. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Tom" wrote in message ... I can get Word to create the brackets using CRTL F9 but I can't seem to get it to create the expression inside the brackets as follows: { If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶ "Graham Mayor" wrote: You cannot paste fields from a KB article, you have to recreate them using CTRL+F9 for each pair of field boundaries {} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Tom wrote: I am trying to get a mail merge to put city into a table, show all records for the city into a second table on the same page and then start a new page whenever the city changes. I tried to use the following code from Microsoft KB but it does not work: { If { MERGESEQ } = "1" "{ MERGEFIELD CITY }¶ " ""}{ SET Place1 { MERGEFIELD CITY }}¶ { If { Place2 } { Place1 }"¶ ----------------------------Page Break-------------------------------- { MERGEFIELD CITY }¶ ¶ { MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" "{ MERGEFIELD EMPLOYEE } { MERGEFIELD SALES }" }{ SET Place2 { MERGEFIELD CITY }}¶ I pasted the code as if from Microsoft's website becuase I could not figure out out to create the formulas. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't insert "continuous" section break | Microsoft Word Help | |||
Grouping bookmarks | Formatting Long Documents |