>I have two Mergefields on the same line <<County>> and <<PostCode>>.
> In some cases, like sending a letter to Australia, the County field is
[quoted text clipped - 11 lines]
> Best Regards
> John
Peter,
Thanks for the advice. The code at present is as follows:
{ IF { MERGEFIELD Country } = "" { MERGEFIELD PostCode }
"{ MERGEFIELD
Country } { MERGEFIELD PostCode }" }
I understand what you are saying but, if, as you suggest, I put
{Mergefield Postcode} at the end, it will be OK if Potscode is blank
but if it is not, I will get Postcode twice.
I'm not sure how this solves the problem.
Best Regards
John
On 16 Mar, 13:15, "Peter Jamieson" <p...@KillmapSpjjnet.demon.co.uk>
wrote:
> How about
>
[quoted text clipped - 32 lines]
>
> - Show quoted text -
john@jdraper.net - 16 Mar 2007 14:47 GMT
Thanks Graham,
It seems very complicated but it works - I won't pretend to understand
how!
Best Regards
John
On 16 Mar, 13:33, j...@jdraper.net wrote:
> Peter,
>
[quoted text clipped - 54 lines]
>
> - Show quoted text -
Graham Mayor - 16 Mar 2007 15:14 GMT
It is quite simple:
Town
If the county has content move down a line and enter the county and the
postcode (it doesn't matter of the postcode is empty here as the blank space
is at the end of the line).
If the county has no content have a look in postcode.
If postcode has content move down a line and enter the postcode
If both county and postcode are empty stay on the line with town
then move down a line and add the country.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Thanks Graham,
>
[quoted text clipped - 65 lines]
>>
>> - Show quoted text -
john@jdraper.net - 16 Mar 2007 15:30 GMT
Thanks to both Peter and Graham for taking the trouble to explain how
their code works. I'm really grateful to both of you for your posts
as they have solved my problem.
Best Regards
John
> It is quite simple:
> Town
[quoted text clipped - 86 lines]
>
> - Show quoted text -
Peter Jamieson - 16 Mar 2007 14:52 GMT
> I understand what you are saying but, if, as you suggest, I put
> {Mergefield Postcode} at the end, it will be OK if Potscode is blank
> but if it is not, I will get Postcode twice.
I don't think so, with the code I posted, unless you also have { MERGEFIELD
Postcode } on another line. Here's my effort, with County->Country
>> { IF "{ MERGEFIELD Country }" = "" "" "{ MERGEFIELD Country } " }{
>> MERGEFIELD
>> Postcode }
If Country is blank, the IF field returns blank and you get { MERGEFIELD
Postcode }. However, if Postcode is also blank then the line should be
suppressed.
If Country is non-blank you get { MERGEFIELD Country } and two spaces from
the IF field, then { MERGEFIELD Postcode }. If the Postcode is blank then
you don't actually need those two spaces but there you are.
But I didn't read the original thread so maybe there is more to it than you
have said in this one. Or maybe Graham's submission has sorted it for you.
Peter Jamieson
> Peter,
>
[quoted text clipped - 54 lines]
>>
>> - Show quoted text -