Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I'd appreciate help for setting alternate name and address layouts in a mail
merge. For example, the default layout might have these fields on 2 lines: Suburb City & PostCode But if there is extra information in the full address, those fields might need to go all on one line to meet constraints of page size, postal regs etc: Suburb & City & PostCode Any tips on how to do this would be appreciated. |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Broadly speaking, you can use IF fields to do some of this. For example
suppose you have two address lines, and if address2 is blank you want address1 suburb city postcode but if it is non-blank you want address1 address2 suburb, city postcode then you can use { MERGEFIELD address1 } { IF "{ MERGEFIELD address2 }" = "" "{ MERGEFIELD suburb } { MERGEFIELD city } { MERGEFIELD postcode }" "{ MERGEFIELD address2 } { MERGEFIELD suburb }, { MERGEFIELD city } { MERGEFIELD postcode }" } (or in this case { MERGEFIELD address1 } { IF "{ MERGEFIELD address2 }" = "" "{ MERGEFIELD suburb } " "{ MERGEFIELD address2 } { MERGEFIELD suburb }, " }{ MERGEFIELD city } { MERGEFIELD postcode } etc. All the {} need to be the special "field code braces" that you can insert using ctrl-F9. Determining a layout based on the amount of text would be more difficult - I don't think there's an obvious way to compare actual text width unless you are using fixed-width fonts, but you may be able to get character counts from your data source (depending on what it is) or do comparisons using "wildcards" to determine character counts. Peter Jamieson http://tips.pjmsn.me.uk Visit Londinium at http://www.ralphwatson.tv Peter wrote: I'd appreciate help for setting alternate name and address layouts in a mail merge. For example, the default layout might have these fields on 2 lines: Suburb City & PostCode But if there is extra information in the full address, those fields might need to go all on one line to meet constraints of page size, postal regs etc: Suburb & City & PostCode Any tips on how to do this would be appreciated. |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Thanks for the suggestions, which look quite promising. I'll try them out
and get back to you if I get stuck. "Peter Jamieson" wrote: Broadly speaking, you can use IF fields to do some of this. For example suppose you have two address lines, and if address2 is blank you want address1 suburb city postcode but if it is non-blank you want address1 address2 suburb, city postcode then you can use { MERGEFIELD address1 } { IF "{ MERGEFIELD address2 }" = "" "{ MERGEFIELD suburb } { MERGEFIELD city } { MERGEFIELD postcode }" "{ MERGEFIELD address2 } { MERGEFIELD suburb }, { MERGEFIELD city } { MERGEFIELD postcode }" } (or in this case { MERGEFIELD address1 } { IF "{ MERGEFIELD address2 }" = "" "{ MERGEFIELD suburb } " "{ MERGEFIELD address2 } { MERGEFIELD suburb }, " }{ MERGEFIELD city } { MERGEFIELD postcode } etc. All the {} need to be the special "field code braces" that you can insert using ctrl-F9. Determining a layout based on the amount of text would be more difficult - I don't think there's an obvious way to compare actual text width unless you are using fixed-width fonts, but you may be able to get character counts from your data source (depending on what it is) or do comparisons using "wildcards" to determine character counts. Peter Jamieson http://tips.pjmsn.me.uk Visit Londinium at http://www.ralphwatson.tv Peter wrote: I'd appreciate help for setting alternate name and address layouts in a mail merge. For example, the default layout might have these fields on 2 lines: Suburb City & PostCode But if there is extra information in the full address, those fields might need to go all on one line to meet constraints of page size, postal regs etc: Suburb & City & PostCode Any tips on how to do this would be appreciated. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Form field in conditional statement | Microsoft Word Help | |||
HOW DO I SET UP A CONDITIONAL FORMAT TO A FIELD | Mailmerge | |||
Conditional Wordart via Mailmerge-Field? | Mailmerge | |||
Conditional page numbering field in header | New Users | |||
Conditional merging a field and formating it | Mailmerge |