Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / April 2008

Tip: Looking for answers? Try searching our database.

IF THEN ELSE question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gabo.mercado@gmail.com - 23 Apr 2008 19:46 GMT
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
Doug Robbins - Word MVP - 23 Apr 2008 20:44 GMT
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.

Signature

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

>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
[quoted text clipped - 11 lines]
>
> Thanks for any help
gabo.mercado@gmail.com - 24 Apr 2008 15:23 GMT
On Apr 23, 3:44 pm, "Doug Robbins - Word MVP"
<d...@REMOVECAPSmvps.org> wrote:
> Use
>
[quoted text clipped - 34 lines]
>
> - Show quoted text -

Perfect!!!!

Many thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.