Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Joe Di Giulio Joe Di Giulio is offline
external usenet poster
 
Posts: 1
Default Problems with IF statement

Hello,

I am attempting to cater for a blank address2 in a mail merge. I have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is not blank.
I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my doc. Can
someone point out where I have gone wrong? I am using Word 2003

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Problems with IF statement

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:
Hello,

I am attempting to cater for a blank address2 in a mail merge. I have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is not
blank. I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my
doc. Can someone point out where I have gone wrong? I am using Word
2003

Thanks in advance



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Briza Briza is offline
external usenet poster
 
Posts: 8
Default Problems with IF statement

Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if blank
like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:
Hello,

I am attempting to cater for a blank address2 in a mail merge. I have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is not
blank. I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my
doc. Can someone point out where I have gone wrong? I am using Word
2003

Thanks in advance




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Problems with IF statement

You must put the carriage return exactly where it appears in Graham's post

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


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

"Briza" wrote in message
...
Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if blank
like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:
Hello,

I am attempting to cater for a blank address2 in a mail merge. I have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is not
blank. I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my
doc. Can someone point out where I have gone wrong? I am using Word
2003

Thanks in advance






  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Briza Briza is offline
external usenet poster
 
Posts: 8
Default Problems with IF statement

Thank you but how do I insert a carriage return.
What is the key or key combination in word 2007?

"Doug Robbins - Word MVP" wrote:

You must put the carriage return exactly where it appears in Graham's post

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }¶
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "¶
{ MERGEFIELD Addr2 }" }¶
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


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

"Briza" wrote in message
...
Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if blank
like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:
Hello,

I am attempting to cater for a blank address2 in a mail merge. I have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is not
blank. I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my
doc. Can someone point out where I have gone wrong? I am using Word
2003

Thanks in advance








  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Problems with IF statement

Use the Enter key

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

"Briza" wrote in message
...
Thank you but how do I insert a carriage return.
What is the key or key combination in word 2007?

"Doug Robbins - Word MVP" wrote:

You must put the carriage return exactly where it appears in Graham's
post

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


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

"Briza" wrote in message
...
Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if
blank
like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:
Hello,

I am attempting to cater for a blank address2 in a mail merge. I
have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD
LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD
Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is
not
blank. I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my
doc. Can someone point out where I have gone wrong? I am using Word
2003

Thanks in advance








  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Problems with IF statement

Press the enter key where is shown and nowhere else in the field
construction.


--

Graham Mayor - Word MVP

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


Briza wrote:
Thank you but how do I insert a carriage return.
What is the key or key combination in word 2007?

"Doug Robbins - Word MVP" wrote:

You must put the carriage return exactly where it appears in
Graham's post

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName
} { MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


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

"Briza" wrote in message
...
Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if
blank like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD
LastName } { MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:
Hello,

I am attempting to cater for a blank address2 in a mail merge. I
have written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD
LastName } { MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD
Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is
not blank. I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my
doc. Can someone point out where I have gone wrong? I am using
Word 2003

Thanks in advance



  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Briza Briza is offline
external usenet poster
 
Posts: 8
Default Problems with IF statement

Hmm..ok I'm still really confused about this eventhough it sounds so simple.
When I press the enter/return key on my keyboard it doesn't bring up the
carriage return symbol but rather goes to the next line. I notice if I go
insert -- symbols -- special characters from the menu there is a symbol
that represents a paragraph.

All I want to do is insert a 2nd line address (which might be a PO Box for
example) on a separate line by itself. Please could you clarify how to do
this?

"Doug Robbins - Word MVP" wrote:

Use the Enter key

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

"Briza" wrote in message
...
Thank you but how do I insert a carriage return.
What is the key or key combination in word 2007?

"Doug Robbins - Word MVP" wrote:

You must put the carriage return exactly where it appears in Graham's
post

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }¶
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "¶
{ MERGEFIELD Addr2 }" }¶
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


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

"Briza" wrote in message
...
Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if
blank
like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:
Hello,

I am attempting to cater for a blank address2 in a mail merge. I
have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD
LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD
Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is
not
blank. I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my
doc. Can someone point out where I have gone wrong? I am using Word
2003

Thanks in advance









  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Problems with IF statement

Click on the button on the toolbar and then you should see a where you
pressed Enter.

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

"Briza" wrote in message
...
Hmm..ok I'm still really confused about this eventhough it sounds so
simple.
When I press the enter/return key on my keyboard it doesn't bring up the
carriage return symbol but rather goes to the next line. I notice if I go
insert -- symbols -- special characters from the menu there is a symbol
that represents a paragraph.

All I want to do is insert a 2nd line address (which might be a PO Box for
example) on a separate line by itself. Please could you clarify how to do
this?

"Doug Robbins - Word MVP" wrote:

Use the Enter key

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

"Briza" wrote in message
...
Thank you but how do I insert a carriage return.
What is the key or key combination in word 2007?

"Doug Robbins - Word MVP" wrote:

You must put the carriage return exactly where it appears in Graham's
post

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


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

"Briza" wrote in message
...
Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if
blank
like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD
LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:
Hello,

I am attempting to cater for a blank address2 in a mail merge. I
have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD
LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD
Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is
not
blank. I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being
displayed.

I have included the spaces in the IF statement as it appears in
my
doc. Can someone point out where I have gone wrong? I am using
Word
2003

Thanks in advance











  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Fiona Pepper Fiona Pepper is offline
external usenet poster
 
Posts: 1
Default Suppressing blank field when using an IF Statement in mail merge (word2003)

Hi,

I would like to "suppress" a blank field when I use the following IF statement ...
{ IF {MERGEFIELD Location_Type} = "Office" "{MERGEFIELD Main_Employer}" ""}.

I have tried using the following:
\f
"" "
{IF{MERGEFIELD}"""True""False"}

Nothing seems to work, but maybe I am placing them in the wrong part of the IF statement.

Any help that anyone can offer will greatfully be received.

Thanks in advance,
Fiona.



Doug Robbins - Word MVP wrote:

Click on the ? button on the toolbar and then you should see a ? where you
25-Nov-07

Click on the ? button on the toolbar and then you should see a ? where you
pressed Enter.

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

"Briza" wrote in message
...

Previous Posts In This Thread:

On Thursday, November 08, 2007 7:26 AM
JoeDiGiuli wrote:

Problems with IF statement
Hello,

I am attempting to cater for a blank address2 in a mail merge. I have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is not blank.
I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my doc. Can
someone point out where I have gone wrong? I am using Word 2003

Thanks in advance

On Thursday, November 08, 2007 8:18 AM
Graham Mayor wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }{
{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:

On Thursday, November 08, 2007 6:46 PM
Briz wrote:

Thank you.
Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if blank
like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

On Thursday, November 08, 2007 9:28 PM
Doug Robbins - Word MVP wrote:

You must put the carriage return exactly where it appears in Graham's post{
You must put the carriage return exactly where it appears in Graham's post

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }?
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "?
{ MERGEFIELD Addr2 }" }?
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


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

"Briza" wrote in message
...

On Sunday, November 11, 2007 2:29 AM
Briz wrote:

Thank you but how do I insert a carriage return.
Thank you but how do I insert a carriage return.
What is the key or key combination in word 2007?

"Doug Robbins - Word MVP" wrote:

On Sunday, November 11, 2007 2:33 AM
Doug Robbins - Word MVP wrote:

Use the Enter key-- Hope this helps.
Use the Enter key

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

On Sunday, November 11, 2007 2:42 AM
Graham Mayor wrote:

Press the enter key where ? is shown and nowhere else in the field
Press the enter key where ? is shown and nowhere else in the field
construction.


--

Graham Mayor - Word MVP

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


Briza wrote:

On Sunday, November 25, 2007 7:18 PM
Briz wrote:

Hmm..ok I'm still really confused about this eventhough it sounds so simple.
Hmm..ok I'm still really confused about this eventhough it sounds so simple.
When I press the enter/return key on my keyboard it doesn't bring up the
carriage return symbol but rather goes to the next line. I notice if I go
insert -- symbols -- special characters from the menu there is a symbol
that represents a paragraph.

All I want to do is insert a 2nd line address (which might be a PO Box for
example) on a separate line by itself. Please could you clarify how to do
this?

"Doug Robbins - Word MVP" wrote:

On Sunday, November 25, 2007 8:09 PM
Doug Robbins - Word MVP wrote:

Click on the ? button on the toolbar and then you should see a ? where you
Click on the ? button on the toolbar and then you should see a ? where you
pressed Enter.

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

"Briza" wrote in message
...


Submitted via EggHeadCafe - Software Developer Portal of Choice
What's New for Developers in SharePoint 2010 Object Model?
http://www.eggheadcafe.com/tutorials...evelopers.aspx


  #11   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Suppressing blank field when using an IF Statement in mail merge(word 2003)

It isn't actually completely clear what you are trying to suppress. If {
MERGEFIELD Main_Employer } is blank, you should get blank anyway. So can
you spell out what you need?


Peter Jamieson

http://tips.pjmsn.me.uk

On 24/02/2010 16:12, Fiona Pepper wrote:
Hi,

I would like to "suppress" a blank field when I use the following IF statement ...
{ IF {MERGEFIELD Location_Type} = "Office" "{MERGEFIELD Main_Employer}" ""}.

I have tried using the following:
\f
"""
{IF{MERGEFIELD}"""True""False"}

Nothing seems to work, but maybe I am placing them in the wrong part of the IF statement.

Any help that anyone can offer will greatfully be received.

Thanks in advance,
Fiona.



Doug Robbins - Word MVP wrote:

Click on the ? button on the toolbar and then you should see a ? where you
25-Nov-07

Click on the ? button on the toolbar and then you should see a ? where you
pressed Enter.

  #12   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Suppressing blank field when using an IF Statement in mail merge (word 2003)

What result are you getting? Did you use Ctrl+F9 to insert the field
delimiters { } ?

--
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, originally posted via msnews.microsoft.com

"Fiona Pepper" wrote in message
...
Hi,

I would like to "suppress" a blank field when I use the following IF
statement ...
{ IF {MERGEFIELD Location_Type} = "Office" "{MERGEFIELD Main_Employer}"
""}.

I have tried using the following:
\f
"" "
{IF{MERGEFIELD}"""True""False"}

Nothing seems to work, but maybe I am placing them in the wrong part of
the IF statement.

Any help that anyone can offer will greatfully be received.

Thanks in advance,
Fiona.



Doug Robbins - Word MVP wrote:

Click on the ? button on the toolbar and then you should see a ? where you
25-Nov-07

Click on the ? button on the toolbar and then you should see a ? where you
pressed Enter.

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

"Briza" wrote in message
...

Previous Posts In This Thread:

On Thursday, November 08, 2007 7:26 AM
JoeDiGiuli wrote:

Problems with IF statement
Hello,

I am attempting to cater for a blank address2 in a mail merge. I have
written the following expression:

{ MERGEFIELD Title } { MERGEFIELD FristName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }
{ IF { MERGEFIELD Addr2 } = "" "" "{ MERGEFIELD Addr2 }
" }{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode }


The intention is to enter Addr2 and a carriage return if Addr2 is not
blank.
I have two problems with this at the moment:
1. The carriage return is not working
2. If the text for Addr2 is "Level 21" only 21 is being displayed.

I have included the spaces in the IF statement as it appears in my doc.
Can
someone point out where I have gone wrong? I am using Word 2003

Thanks in advance

On Thursday, November 08, 2007 8:18 AM
Graham Mayor wrote:

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }{
{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "
{ MERGEFIELD Addr2 }" }
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


--

Graham Mayor - Word MVP

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


Joe Di Giulio wrote:

On Thursday, November 08, 2007 6:46 PM
Briz wrote:

Thank you.
Thank you.
This worked however if address2 is blank it shows this:

Bob and Jane Smith
12 Microsoft Street

New York

Whereas I want it to put the new york line on the address2 line if blank
like this:
Bob and Jane Smith
12 Microsoft Street
New York.

So could you tell me how to modify the if statement to do this?
Regards
Briza

"Graham Mayor" wrote:

On Thursday, November 08, 2007 9:28 PM
Doug Robbins - Word MVP wrote:

You must put the carriage return exactly where it appears in Graham's
post{
You must put the carriage return exactly where it appears in Graham's post

{ MERGEFIELD Title } { MERGEFIELD FirstName } { MERGEFIELD LastName }?
{ MERGEFIELD Addr1 }{ IF { MERGEFIELD Addr2 } "" "?
{ MERGEFIELD Addr2 }" }?
{ MERGEFIELD City } { MERGEFIELD State } { MERGEFIELD Postcode


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

"Briza" wrote in message
...

On Sunday, November 11, 2007 2:29 AM
Briz wrote:

Thank you but how do I insert a carriage return.
Thank you but how do I insert a carriage return.
What is the key or key combination in word 2007?

"Doug Robbins - Word MVP" wrote:

On Sunday, November 11, 2007 2:33 AM
Doug Robbins - Word MVP wrote:

Use the Enter key-- Hope this helps.
Use the Enter key

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

On Sunday, November 11, 2007 2:42 AM
Graham Mayor wrote:

Press the enter key where ? is shown and nowhere else in the field
Press the enter key where ? is shown and nowhere else in the field
construction.


--

Graham Mayor - Word MVP

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


Briza wrote:

On Sunday, November 25, 2007 7:18 PM
Briz wrote:

Hmm..ok I'm still really confused about this eventhough it sounds so
simple.
Hmm..ok I'm still really confused about this eventhough it sounds so
simple.
When I press the enter/return key on my keyboard it doesn't bring up the
carriage return symbol but rather goes to the next line. I notice if I go
insert -- symbols -- special characters from the menu there is a symbol
that represents a paragraph.

All I want to do is insert a 2nd line address (which might be a PO Box for
example) on a separate line by itself. Please could you clarify how to do
this?

"Doug Robbins - Word MVP" wrote:

On Sunday, November 25, 2007 8:09 PM
Doug Robbins - Word MVP wrote:

Click on the ? button on the toolbar and then you should see a ? where you
Click on the ? button on the toolbar and then you should see a ? where you
pressed Enter.

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

"Briza" wrote in message
...


Submitted via EggHeadCafe - Software Developer Portal of Choice
What's New for Developers in SharePoint 2010 Object Model?
http://www.eggheadcafe.com/tutorials...evelopers.aspx


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
which statement right , question is Choose the correct statement? how many template?when we click new doc Microsoft Word Help 1 October 16th 06 11:15 AM
which statement right , question isChoose the correct statement? how many template?when we click new doc Microsoft Word Help 1 October 15th 06 11:20 PM
If statement Mykas_Robi Mailmerge 3 August 26th 05 08:43 PM
If statement problems in mail merge jameseyryan Mailmerge 6 August 5th 05 09:29 PM
or statement JCSadie Mailmerge 1 April 25th 05 06:54 PM


All times are GMT +1. The time now is 01:34 AM.

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

About Us

"It's about Microsoft Word"