Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
JohnH JohnH is offline
external usenet poster
 
Posts: 32
Default If Statements in Word 2007 How To?

I have seen many post on how to suppress blanks lines in a merge ( address
line 2 is blank so don't print it). My Problem is I cannot figure out how to
write the If statment. I've seen posts that show the actual merge with the IF
in it but for the life of me I can not reporduce it. I've tried the Rule
option but I can't figure how to enter the merge fields.. I tried typing
directly into the doc but that gets treated as text. I know I'm just missing
some simple process step but I cannot figure it out or find it in help. MS
Word help does not seem to address this process. I can find unlimited methods
to skip records but not blank fields. The address block is not an option
because it cannot be mapped accurately with the data files I work with plus
it always comes in as 1.5 spacing and I can't turn that off. To make a long
story short hwo do I enter if address_line_2 is blank skip it and print/merge
the city,st,zip line right beneath address_line_1

Thanks
John

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If Statements in Word 2007 How To?

Use CTRL+F9 to enter each pair of field brackets then

{Mergefield Address_Line_1}{IF{Mergefield Address_Line_2} "" "
{Mergefield Address_Line_2}"}
{Mergefield City} etc


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




JohnH wrote:
I have seen many post on how to suppress blanks lines in a merge (
address line 2 is blank so don't print it). My Problem is I cannot
figure out how to write the If statment. I've seen posts that show
the actual merge with the IF in it but for the life of me I can not
reporduce it. I've tried the Rule option but I can't figure how to
enter the merge fields.. I tried typing directly into the doc but
that gets treated as text. I know I'm just missing some simple
process step but I cannot figure it out or find it in help. MS Word
help does not seem to address this process. I can find unlimited
methods to skip records but not blank fields. The address block is
not an option because it cannot be mapped accurately with the data
files I work with plus it always comes in as 1.5 spacing and I can't
turn that off. To make a long story short hwo do I enter if
address_line_2 is blank skip it and print/merge the city,st,zip line
right beneath address_line_1

Thanks
John



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Joe Murphy Joe Murphy is offline
external usenet poster
 
Posts: 11
Default If Statements in Word 2007 How To?

On 30 Nov, 14:35, JohnH wrote:
I have seen many post on how to suppress blanks lines in a merge ( address
line 2 is blank so don't print it). My Problem is I cannot figure out how to
write the If statment. I've seen posts that show the actual merge with the IF
in it but for the life of me I can not reporduce it. I've tried the Rule
option but I can't figure how to enter the merge fields.. I tried typing
directly into the doc but that gets treated as text.


Very likely, you need to insert the brackets around the field
properly. Are you typing the brackets?

Don't type the brackets. Instead, highlight the text you want to make
a field and hit Ctrl+F9. That will add the brackets and turn it into a
field.

So you start with, say, MERGEFIELD Date, select both words, hit Ctrl
+F9 and get {MERGEFIELD Date}.

Alt+F9 toggles the visibility of all fields, too.

Joe.
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
JohnH JohnH is offline
external usenet poster
 
Posts: 32
Default If Statements in Word 2007 How To?

YES!!! Thanks Graham & Joe. I almost got it. I'm still having trouble getting
the non blank addr2 on a seperate line without a blank line in between Addr1
& 2. I tried an enter and a shift enter but both produce a blank line between
addr1 & 2

Thanks so much.

"Graham Mayor" wrote:

Use CTRL+F9 to enter each pair of field brackets then

{Mergefield Address_Line_1}{IF{Mergefield Address_Line_2} "" "
{Mergefield Address_Line_2}"}
{Mergefield City} etc


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




JohnH wrote:
I have seen many post on how to suppress blanks lines in a merge (
address line 2 is blank so don't print it). My Problem is I cannot
figure out how to write the If statment. I've seen posts that show
the actual merge with the IF in it but for the life of me I can not
reporduce it. I've tried the Rule option but I can't figure how to
enter the merge fields.. I tried typing directly into the doc but
that gets treated as text. I know I'm just missing some simple
process step but I cannot figure it out or find it in help. MS Word
help does not seem to address this process. I can find unlimited
methods to skip records but not blank fields. The address block is
not an option because it cannot be mapped accurately with the data
files I work with plus it always comes in as 1.5 spacing and I can't
turn that off. To make a long story short hwo do I enter if
address_line_2 is blank skip it and print/merge the city,st,zip line
right beneath address_line_1

Thanks
John




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
JohnH JohnH is offline
external usenet poster
 
Posts: 32
Default If Statements in Word 2007 How To?

Actuall Graham I'm all set I think? It appears to be an anomaly? The first
time I look at a record with addr2 it shows a blank line between addr1 & 2
but if I cursor back and forth ti appeas fine. Appears fine in print as well.

Thanks Again
John

"Graham Mayor" wrote:

Use CTRL+F9 to enter each pair of field brackets then

{Mergefield Address_Line_1}{IF{Mergefield Address_Line_2} "" "
{Mergefield Address_Line_2}"}
{Mergefield City} etc


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




JohnH wrote:
I have seen many post on how to suppress blanks lines in a merge (
address line 2 is blank so don't print it). My Problem is I cannot
figure out how to write the If statment. I've seen posts that show
the actual merge with the IF in it but for the life of me I can not
reporduce it. I've tried the Rule option but I can't figure how to
enter the merge fields.. I tried typing directly into the doc but
that gets treated as text. I know I'm just missing some simple
process step but I cannot figure it out or find it in help. MS Word
help does not seem to address this process. I can find unlimited
methods to skip records but not blank fields. The address block is
not an option because it cannot be mapped accurately with the data
files I work with plus it always comes in as 1.5 spacing and I can't
turn that off. To make a long story short hwo do I enter if
address_line_2 is blank skip it and print/merge the city,st,zip line
right beneath address_line_1

Thanks
John






  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If Statements in Word 2007 How To?

Merge to a new document to test.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


JohnH wrote:
Actuall Graham I'm all set I think? It appears to be an anomaly? The
first time I look at a record with addr2 it shows a blank line
between addr1 & 2 but if I cursor back and forth ti appeas fine.
Appears fine in print as well.

Thanks Again
John

"Graham Mayor" wrote:

Use CTRL+F9 to enter each pair of field brackets then

{Mergefield Address_Line_1}{IF{Mergefield Address_Line_2} "" "
{Mergefield Address_Line_2}"}
{Mergefield City} etc


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




JohnH wrote:
I have seen many post on how to suppress blanks lines in a merge (
address line 2 is blank so don't print it). My Problem is I cannot
figure out how to write the If statment. I've seen posts that show
the actual merge with the IF in it but for the life of me I can not
reporduce it. I've tried the Rule option but I can't figure how to
enter the merge fields.. I tried typing directly into the doc but
that gets treated as text. I know I'm just missing some simple
process step but I cannot figure it out or find it in help. MS Word
help does not seem to address this process. I can find unlimited
methods to skip records but not blank fields. The address block is
not an option because it cannot be mapped accurately with the data
files I work with plus it always comes in as 1.5 spacing and I can't
turn that off. To make a long story short hwo do I enter if
address_line_2 is blank skip it and print/merge the city,st,zip line
right beneath address_line_1

Thanks
John



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word mailmerge how to do multiple If statements Pearl Mailmerge 22 April 22nd 23 02:49 PM
IF Statements in Word Fields Erika Microsoft Word Help 1 August 1st 07 11:58 AM
If -Then-Else Statements in Word 2003 bxgti4x4 Mailmerge 7 March 16th 07 10:10 AM
Formatting IF statements in Word 2003 Vicki Mailmerge 3 March 8th 07 04:35 AM
Mail Merge If Statements (Word 02) Tab Mailmerge 1 March 4th 05 08:01 AM


All times are GMT +1. The time now is 06:02 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"