Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Another skip blank line
I have a merge letter addressed as follows:
{MERGEFIELD INSNAM} {MERGEFIELD "INSAD1"} {MERGEFIELD "INSAD2"} {MERGEFIELD "INSAD3} {MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"} If INSAD2 is blank, I don't want a blank line. I want it to skip to INSAD3. IF INSAD3 is empty, I want it to skip to INSCITY, also without leaving a blank line. How do I code this so that the blank line is skipped when I merge my file? Also, sometimes, I get a large space after the INSCITY, but before the INSST. For example: PHOENIX , AZ How do I elimate the blank space at the end of a field? Thanks for anyone's suggestions. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Another skip blank line
{MERGEFIELD INSNAM}
{MERGEFIELD "INSAD1"} { IF {MERGEFIELD "INSAD2"} "" "{MERGEFIELD "INSAD2"}[ENTER] { IF {MERGEFIELD "INSAD3} "" "{MERGEFIELD "INSAD3}[ENTER] {MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"}" "{MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"}" } "{ IF {MERGEFIELD "INSAD3} "" "{MERGEFIELD "INSAD3}[ENTER] {MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"}" "{MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"}" }" } Press the Enter key wherever [ENTER] is located in the above construction. The spaces between the City and the State must be in the data source and will need to be removed from there. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "hlock" wrote in message news I have a merge letter addressed as follows: {MERGEFIELD INSNAM} {MERGEFIELD "INSAD1"} {MERGEFIELD "INSAD2"} {MERGEFIELD "INSAD3} {MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"} If INSAD2 is blank, I don't want a blank line. I want it to skip to INSAD3. IF INSAD3 is empty, I want it to skip to INSCITY, also without leaving a blank line. How do I code this so that the blank line is skipped when I merge my file? Also, sometimes, I get a large space after the INSCITY, but before the INSST. For example: PHOENIX , AZ How do I elimate the blank space at the end of a field? Thanks for anyone's suggestions. |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Another skip blank line
I have a tougher nut to crack.
If I have the following: {MERGEFIELD A} {MERGEFIELD B} {MERGEFIELD C} {MERGEFIELD D} {MERGEFIELD E} {MERGEFIELD F} {MERGEFIELD G} If I have blank fields from B to F in my Excel worksheet, and I don't want Word to leave blank lines during mail merge, instead I want it to just show field A and G. How do you do this? Using "IF" function in Excel is so much easier than Word. Any help from Word gurus out there? Red "Doug Robbins - Word MVP" wrote: {MERGEFIELD INSNAM} {MERGEFIELD "INSAD1"} { IF {MERGEFIELD "INSAD2"} "" "{MERGEFIELD "INSAD2"}[ENTER] { IF {MERGEFIELD "INSAD3} "" "{MERGEFIELD "INSAD3}[ENTER] {MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"}" "{MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"}" } "{ IF {MERGEFIELD "INSAD3} "" "{MERGEFIELD "INSAD3}[ENTER] {MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"}" "{MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"}" }" } Press the Enter key wherever [ENTER] is located in the above construction. The spaces between the City and the State must be in the data source and will need to be removed from there. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "hlock" wrote in message news I have a merge letter addressed as follows: {MERGEFIELD INSNAM} {MERGEFIELD "INSAD1"} {MERGEFIELD "INSAD2"} {MERGEFIELD "INSAD3} {MERGEFIELD "INSCITY"}, {MERGEFIELD "INSST"} {MERGEFIELD "INSZIP"} If INSAD2 is blank, I don't want a blank line. I want it to skip to INSAD3. IF INSAD3 is empty, I want it to skip to INSCITY, also without leaving a blank line. How do I code this so that the blank line is skipped when I merge my file? Also, sometimes, I get a large space after the INSCITY, but before the INSST. For example: PHOENIX , AZ How do I elimate the blank space at the end of a field? Thanks for anyone's suggestions. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mergefield conditional, need to skip blank line | Mailmerge | |||
How can I skip blank lines when line numbering? | Page Layout | |||
How do I skip page line numbers for blank lines?? | Page Layout | |||
How do I skip line numbering on blank lines? | Page Layout | |||
How to skip line numbers for all blank lines in a document | Page Layout |