> Just spotted an anomaly in an Excel database I'm merging.
>
[quoted text clipped - 9 lines]
>
> Mark
Hi Doug
Hmmm I tried that but I must be inputting it wrongly as it the 'IF-THEN'
either appears in the results as text or doesn't do anything. I'm also not
sure wether to put the 'IF-THEN' before, or after the 'Address 1 field'.
I've tried inputting it using the wizard but I'm not sure how to enter the
fields in the 'compare to' box or in the 'Otherwise print this' box. I've
also tried inputting directly after pressing Alt+F9.
Also when I find the solution, where the address line is ignored, would it
be treated like any other blank line so that the remaining part of the
address is shifted upwards (assuming the 'don't print blank lines' is
selected).
I daresay it is a simple solution, but it eludes me.
Cheers
Mark
> Hi Mark,
>
[quoted text clipped - 21 lines]
> >
> > Mark
Doug Robbins - Word MVP - 31 Oct 2003 10:29 GMT
Hi Mark,
Starting with the Wizard, select the Address1 mergefield as the one to be
tested and for the condition use Equal to and put a 1 in the box next to it.
Then for the results, enter 2 and then 3. Then click on OK.
Then press Alt+F9 to toggle on the field codes and you will see
{ IF { MERGEFIELD Address1 } = 1 "2" "3" }
Now, select the 1 and then insert the Address2 mergefield. Then select the
"2" and in place of it, insert the Address1 mergefield, and in place of the
"3", insert the Address1 mergefield plus Shift+Enter for a new line and then
the Address2 mergefield
so that you end up with
{ IF { MERGEFIELD Address1 } = { MERGEFIELD Address2 } { MERGEFIELD
Address1 } { MERGEFIELD Address1 }
{ MERGEFIELD Address2 } }
Toggle of the field codes with Alt+F9.
All this goes in place of the Address1 and Address2 mergefields. They
should not appear anywhere other than in the above field construction.
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
> Hi Doug
>
[quoted text clipped - 43 lines]
> > >
> > > Mark
KallKwik Didcot - 31 Oct 2003 14:13 GMT
Well that seems to have done the job Doug thank you.
I found this seemed to work better for me though (I deleted one of the
Address1 mergefields), but I will have to test the merge more to see if
there are any unwanted side effects.
{ IF { MERGEFIELD Address1 } = { MERGEFIELD Address2 } { MERGEFIELD
Address1 }
{ MERGEFIELD Address2 } }
Much appreciate your help
Many thanks
Mark
> Hi Mark,
>
[quoted text clipped - 28 lines]
> Hope this helps
> Doug Robbins - Word MVP
KallKwik Didcot - 31 Oct 2003 14:56 GMT
Hi Doug
You were right after all, I mistook the missing field as being the selective
deletion generated by the IF-THEN but on closer scrutiny, the field was
missing in all cases.
Again many thanks for that.
Cheers
Mark
> Well that seems to have done the job Doug thank you.
>
[quoted text clipped - 47 lines]
> > Hope this helps
> > Doug Robbins - Word MVP