Reply
 
Thread Tools Display Modes
  #1   Report Post  
Tom
 
Posts: n/a
Default 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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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   Report Post  
Tom
 
Posts: n/a
Default

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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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   Report Post  
Doug Robbins
 
Posts: n/a
Default


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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't insert "continuous" section break Cowtoon Microsoft Word Help 3 March 16th 05 10:31 PM
Grouping bookmarks Botkyrka; a part of Europe Formatting Long Documents 3 January 6th 05 03:21 PM


All times are GMT +1. The time now is 09:52 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"