View Single Post
  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
GregNga GregNga is offline
external usenet poster
 
Posts: 23
Default Ignore blank address fields

Yes, it's been very helpful.........thanks

"Doug Robbins - Word MVP" wrote:

You are right about the last line. I was of course entering the replicas of
field delimiters from the keyboard (the only way in the mail program) but if
you use Ctrl+F9 to enter then as is necessary to get them to work, you will
always get matched pairs { }.

--
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

"GregNga" wrote in message
...
I see this a lot more clearly now. Btw, seems that the last line should be
{MAILMERGE City } { MAILMERGE State } { MAILMERGE Zip }" }
instead of
{MAILMERGE City { { MAILMERGE State } { MAILMERGE Zip }" }

Thanks for helping me understand this

"Doug Robbins - Word MVP" wrote:

{ MAILMERGE Title} { MAILMERGE Firstname } { MAILMERGE Lastname }[Enter]
{ MAILMERGE Addr1 }[Enter]
{ IF { MAILMERGE Addr2 } = "" "{ MAILMERGE City } { MAILMERGE State } {
MAILMERGE Zip }" "{ MAILMERGE Addr2 }[Enter]
{MAILMERGE City { { MAILMERGE State } { MAILMERGE Zip }" }

Use the Enter Key or Shift+Enter in place of the [Enter] above.
--
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

"GregNga" wrote in message
...
Here is how I want to format the envelope:


Title Firstname Lastname
Addr1
Addr2
City State Zip

I only want to print the line with Addr2 if it is non-blank. How do I
format
my document using If, Then Else


"Doug Robbins - Word MVP" wrote:

You will need to use an If...then...Else field construction

{ IF { MERGEFIELD field2 } = "" "{ MERGEFIELD field3 }" "{ MERGEFIELD
field2 }¶
{ MERGEFIELD field3 }" }

You must use Ctrl+F9 to insert each pair of field delimiters and where
the ¶
appears in the above, you need to press the Enter key or Shift +
Enter.

Use Alt+F9 to toggle off the display of the field codes.

--
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

"GregNga" wrote in message
...
How to I get Word mail merge to ignore blank address fields. In
other
words,
If address field 2 is blank, I don't want to priht a blank line