Share via

Microsoft Mail Merge Example won't work

Anonymous
2011-02-04T20:25:57+00:00

I am trying to learn Word's mail merge. In order to do this I am following the example featured in the below link

http://support.microsoft.com/kb/294686#appliesto

The above example initially uses the following 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 }}¶

and the following table (I have this table stored in an excel sheet):

City   Employee  Sales

Atlanta  Galos   $3,000

Atlanta  Delaney  $50,000

Atlanta  Henningsen  $10,000

Houston  Johnson  $8,000

Houston  Kelly   $9,000

Houston  Pak   $0

This example has the following output:

Atlanta

Galos $3,000

Delaney $50,000

Henningsen $10,000

----------------------------Page Break-----------------------------

Houston

Johnson $8,000

Kelly $9,000

Pak $0

I follow all the steps but the above code does not produce the intended results. It generates the following output (blanks & pages are indicated):

----------1st page----------

Atlanta

(blank line)

Henningsen10000

----------2nd page----------

(blank line)

Delaney50000

----------3rd page----------

(blank line)

Galos3000

----------4th page----------

(blank line)

(blank line)

HoustonPak0

----------5th page----------

(blank line)

Kelly9000

----------6th page----------

(blank line)

Johnson8000

I am 100% sure that I have typed the above code correctly. My code matches the above code, line breaks (¶) included.

What happens here? What am I doing wrong? Can anybody help me?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
2011-02-04T20:44:34+00:00

See the following page of fellow MVP Graham Mayor’s website:

http://www.gmayor.com/ManyToOne.htm

Or, for more complex, but more capable methods, see fellow MVP Macropod's "Word 97-2007 Catalogue/Directory Mailmerge Tutorial" at:

http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip

Do read the tutorial before trying to use the mailmerge document included with it as you must get the mail merge main document set up exactly as required.

 -- Hope this helps.

Doug Robbins - Word MVP,

dkr[atsymbol]mvps[dot]org

Posted via the Community Bridge

"JOHNINALBANY" wrote in message news:*** Email address is removed for privacy ***...

I am trying to learn Word's mail merge. In order to do this I am following the example featured in the below link

http://support.microsoft.com/kb/294686#appliesto

The above example initially uses the following 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 }}¶

and the following table (I have this table stored in an excel sheet):

City   Employee  Sales

Atlanta  Galos   $3,000

Atlanta  Delaney  $50,000

Atlanta  Henningsen  $10,000

Houston  Johnson  $8,000

Houston  Kelly   $9,000

Houston  Pak   $0

This example has the following output:

Atlanta

Galos $3,000

Delaney $50,000

Henningsen $10,000

----------------------------Page Break----------------------------- Houston

Johnson $8,000

Kelly $9,000

Pak $0

I follow all the steps but the above code does not produce the intended results. It generates the following output (blanks & pages are indicated):

----------1st page---------- Atlanta

(blank line)

Henningsen10000

----------2nd page---------- (blank line)

Delaney50000

----------3rd page---------- (blank line)

Galos3000

----------4th page---------- (blank line)

(blank line)

HoustonPak0

----------5th page---------- (blank line)

Kelly9000

----------6th page---------- (blank line)

Johnson8000

I am 100% sure that I have typed the above code correctly. My code matches the above code, line breaks (¶) included.

What happens here? What am I doing wrong? Can anybody help me?


Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful