Merge fields are one record off from Excel

C

ChristiY

I have a merged mail directory form, so that several rows (from Excel) for
one person generates one letter, with multiple fields repeating. After this
merged field, there are two columns that are merged. The data is merged one
row off from what the spreadsheet column value indicates. How do I get the
correct row/column data to merge appropriately?
 
C

ChristiY

I read your tutorial and would like to try adding the dummy record to the
Excel speadsheet. I was unable to see the merge field coding in your example
word document.

Here is the example of the code I have created.

{ IF {MERGESEQ} = "1"

RE: Policy#:{MERGEFIELD "POLICY"}

""} {SET Insured1{MERGEFIELD POLICY}}
{IF {Insured1} <> {Insured2}"

Current Limits {MERGEFIELD "Amt1"\#$#,###,###\* MERGEFORMAT}/{MERGEFIELD
"Amt2\#$#,###,###\* MERGEFORMAT}

(Page Break is here)

RE: Policy#:{MERGEFIELD "POLICY"}

{MERGEFIELD "AName"} {MERGEFIELD "ADesc"}''{MERGEFIELD "AName"}
{MERGEFIELD "ADesc"}"}{SET Insured2 {MERGEFIELD "POLICY"}}


The merge fields Amt1 and Amt2 are the ones that are off by one row when
document is merged. The merge fields AName and ADesc are the fields that are
repetative.

Please help me with getting the codes correct to accomplish the goal of
having correct amounts after the repetative data.

Thank you very much!
--
CHY


macropod said:
Hi Christi,

Without seeing your field coding, it's hard to say. However, you'll probably be able to resolve the issue if you base your field
coding on the fields used in my Word 97-2007 Catalogue/Directory Mailmerge Tutorial, available at:
http://www.wopr.com/index.php?showtopic=731107&st=0&p=731107&#entry731107
or
http://www.gmayor.com/Zips/Catalogue Mailmerge.zip
Do read the tutorial before trying to use the mailmerge document included with it.

--
Cheers
macropod
[MVP - Microsoft Word]


ChristiY said:
I have a merged mail directory form, so that several rows (from Excel) for
one person generates one letter, with multiple fields repeating. After this
merged field, there are two columns that are merged. The data is merged one
row off from what the spreadsheet column value indicates. How do I get the
correct row/column data to merge appropriately?
 
M

macropod

Hi ChristiY,

You can see the fieldcodes in the tutorial by following the instructions under the heading 'Viewing The Fields'. It helps if you've
got Word set to display fieldshading (Tools|Options|View|Field Shading>Always). Alternatively, to toggle the field code display
on/off (so you can see/hide all the field codes), press Alt-F9.

FWIW, I think you can use a field construction like:
{QUOTE{IF{MERGESEQ}= 1 {SET Key ""}}"{IF{MERGEFIELD POLICY}<> {Key} "{IF{MERGESEQ}> 1 "{QUOTE 12}"}RE: Policy#: {MERGEFIELD
POLICY}{SET Key {MERGEFIELD POLICY}}¶
{MERGEFIELD AName} {MERGEFIELD ADesc}¶
Current Limits: "}{MERGEFIELD Amt1 \# $,0}/{MERGEFIELD Amt2 \# $,0}¶
"}

--
Cheers
macropod
[MVP - Microsoft Word]


ChristiY said:
I read your tutorial and would like to try adding the dummy record to the
Excel speadsheet. I was unable to see the merge field coding in your example
word document.

Here is the example of the code I have created.

{ IF {MERGESEQ} = "1"

RE: Policy#:{MERGEFIELD "POLICY"}

""} {SET Insured1{MERGEFIELD POLICY}}
{IF {Insured1} <> {Insured2}"

Current Limits {MERGEFIELD "Amt1"\#$#,###,###\* MERGEFORMAT}/{MERGEFIELD
"Amt2\#$#,###,###\* MERGEFORMAT}

(Page Break is here)

RE: Policy#:{MERGEFIELD "POLICY"}

{MERGEFIELD "AName"} {MERGEFIELD "ADesc"}''{MERGEFIELD "AName"}
{MERGEFIELD "ADesc"}"}{SET Insured2 {MERGEFIELD "POLICY"}}


The merge fields Amt1 and Amt2 are the ones that are off by one row when
document is merged. The merge fields AName and ADesc are the fields that are
repetative.

Please help me with getting the codes correct to accomplish the goal of
having correct amounts after the repetative data.

Thank you very much!
--
CHY


macropod said:
Hi Christi,

Without seeing your field coding, it's hard to say. However, you'll probably be able to resolve the issue if you base your field
coding on the fields used in my Word 97-2007 Catalogue/Directory Mailmerge Tutorial, available at:
http://www.wopr.com/index.php?showtopic=731107&st=0&p=731107&#entry731107
or
http://www.gmayor.com/Zips/Catalogue Mailmerge.zip
Do read the tutorial before trying to use the mailmerge document included with it.

--
Cheers
macropod
[MVP - Microsoft Word]


ChristiY said:
I have a merged mail directory form, so that several rows (from Excel) for
one person generates one letter, with multiple fields repeating. After this
merged field, there are two columns that are merged. The data is merged one
row off from what the spreadsheet column value indicates. How do I get the
correct row/column data to merge appropriately?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top