Hi,
You could build the logic for this into the Word mailmerge document itself,
thus avoiding the need to edit the spreadsheet.
To do this, you could use a SET field to save the value of the previous
record, and a REF field to access that value before updating with the new
value.
You might need to do something special for the first record, along the lines
of:
{IF {MERGEREC}= 1 {SET oldvalue ""}}
From then on, to test the "old" value, you could use:
{IF{Mergefield TFC} = {oldvalue} {Mergefield Country}}
Having done that, you update the "old" value with the "new" value:
{SET oldvalue {MERGEFIELD TFC}}
for use in the next record.
Cheers
> I figured out an easy way to refer back to the previous record in a merge so
> as not to enter the same information twice.
[quoted text clipped - 12 lines]
> Thankfully, I will not need to use a macro to go back and delete the
> unwanted repeated text.
Frustrated - 11 May 2005 19:01 GMT
Thanks for the tip....I'll give it a try!
> Hi,
>
[quoted text clipped - 37 lines]
> > Thankfully, I will not need to use a macro to go back and delete the
> > unwanted repeated text.
Frustrated - 11 May 2005 20:58 GMT
Thank you...it worked! However, it was even simpler than your suggestion.
I used the SET field at the end of my merge codes to define the reference,
and the IF THEN ELSE field to determine the change in Country name:
{IF {MERGE REC} = 1 "{MERGEFIELD Country}" "{IF {MERGEFIELD Country} =
"{Oldvalue}" " " " {MERGEFIELD Country}"}"}
{SET Oldvalue "{MERGEFIELD Country}"
I had tried something similar earlier, but had used my "SET" field BEFORE
the "IF THEN ELSE" field which negated the results.
Now it works like a charm without altering my spreadsheet!
> > Hi,
> >
[quoted text clipped - 37 lines]
> > > Thankfully, I will not need to use a macro to go back and delete the
> > > unwanted repeated text.