Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] gabo.mercado@gmail.com is offline
external usenet poster
 
Posts: 2
Default IF THEN ELSE question

I need to create a mail-merge document where I have 2 mergefields, if
one is blank I want to print the other merge field. How do I do this
in Office 2007?

The logic is below

If mergefield1 is blank
print mergefield2
else
print mergefield1


{mergefield may/may not have a value and mergefield2 always has a
value}

Thanks for any help
  #2   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 IF THEN ELSE question

Use

{ IF { MERGEFIELD Mergefield1 } "" { MERGEFIELD Mergefield1 } {
MERGEFIELD Mergefield2 } }

You must use Ctrl+F9 for each pair of field delimiters { } and use Alt+F9 to
toggle off their display. You also must have a space either side of the
and also separating the condition from the result and between each result.

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

wrote in message
...
I need to create a mail-merge document where I have 2 mergefields, if
one is blank I want to print the other merge field. How do I do this
in Office 2007?

The logic is below

If mergefield1 is blank
print mergefield2
else
print mergefield1


{mergefield may/may not have a value and mergefield2 always has a
value}

Thanks for any help



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] gabo.mercado@gmail.com is offline
external usenet poster
 
Posts: 2
Default IF THEN ELSE question

On Apr 23, 3:44*pm, "Doug Robbins - Word MVP"
wrote:
Use

{ IF { MERGEFIELD Mergefield1 } "" { MERGEFIELD Mergefield1 } {
MERGEFIELD Mergefield2 } }

You must use Ctrl+F9 for each pair of field delimiters { } and use Alt+F9 to
toggle off their display. *You also must have a space either side of the
and also separating the condition from the result and between each result.

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

wrote in message

...



I need to create a mail-merge document where I have 2 mergefields, if
one is blank I want to print the other merge field. How do I do this
in Office 2007?


The logic is below


If mergefield1 is blank
*print mergefield2
else
*print mergefield1


{mergefield may/may not have a value and mergefield2 always has a
value}


Thanks for any help- Hide quoted text -


- Show quoted text -


Perfect!!!!

Many thanks
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
Row question Dee Tables 2 November 27th 07 01:04 PM
TOC question Osiris Page Layout 1 November 21st 06 01:05 PM
If then else question Michelle Mailmerge 13 May 26th 06 11:28 PM
Question Skyler Terry New Users 2 September 29th 05 05:29 AM
TOC question mikey New Users 3 August 26th 05 05:36 PM


All times are GMT +1. The time now is 06:04 PM.

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"