A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

If Then Else = Fail



 
 
Thread Tools Display Modes
  #1  
Old February 19th 18, 12:01 AM
MP1985 MP1985 is offline
Junior Member
 
First recorded activity by WordBanter: Feb 2018
Posts: 2
Default If Then Else = Fail

Never had this big a struggle with if then, but then I've never introduced a second variable.
This works fine and dandy:
{ IF { MERGEFIELD f3 } = "Y" "{ MERGEFIELD f18 }" "{ MERGEFIELD f2 }
(If party is a child, insert this name, if not insert that name).
It's when I go for two conditions to describe that it just will not pull...
(If party is a child, insert this name, if party is deceased, pull this name, if not insert that name).
{ IF { MERGEFIELD f3 } = "Y" "{ MERGEFIELD f18 }" { IF { MERGEFIELD f5 } = "Y" "{ MERGEFIELD f18 }" "{ MERGEFIELD f2 }" }
{ IF { MERGEFIELD f3 } = "Y" { IF { MERGEFIELD f5 } = "Y" "{ MERGEFIELD f18 }" "{ MERGEFIELD f2 }" }

I would ordinarily not put so many conditionals, but being able to accomplish these two situations will prevent my tired soul from having to create dozens of extra merge docs.

Anyone got any ideas? Thanks!
Ads
  #2  
Old February 19th 18, 02:44 AM
MP1985 MP1985 is offline
Junior Member
 
First recorded activity by WordBanter: Feb 2018
Posts: 2
Default

After much trial and error:

(If party is a child, insert this name, if party is deceased, insert this name, if not insert that name).

{ IF { MERGEFIELD f3 } = "Y" { MERGEFIELD f18 } { IF { MERGEFIELD f5 } = "Y" { MERGEFIELD f18 } { MERGEFIELD f2 } } }

Now onto changing a few dozen documents, better than twice as many!
  #3  
Old February 19th 18, 12:52 PM
Charles K. Kenyon Charles K. Kenyon is offline
Member
 
First recorded activity by WordBanter: Feb 2016
Posts: 40
Default

Quote:
Originally Posted by MP1985 View Post
After much trial and error:

(If party is a child, insert this name, if party is deceased, insert this name, if not insert that name).

{ IF { MERGEFIELD f3 } = "Y" { MERGEFIELD f18 } { IF { MERGEFIELD f5 } = "Y" { MERGEFIELD f18 } { MERGEFIELD f2 } } }

Now onto changing a few dozen documents, better than twice as many!
For more on IF Fields:
http://www.addbalance.com/usersguide...s.htm#IF_field
https://support.office.com/en-us/art...rs=en-US&ad=US
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do drop down menus fail? Joy Microsoft Word Help 0 April 23rd 10 06:07 PM
ASK & REF Fail with Doc Protection Lori Microsoft Word Help 2 December 6th 09 11:09 PM
Keep with next, Widow/orphan, etc all fail John Liungman Page Layout 4 November 16th 05 04:30 PM
footnotes fail to appear James VH Microsoft Word Help 3 November 8th 05 11:50 PM
Images Fail to Appear Ridge Kennedy New Users 3 October 4th 05 06:25 AM


All times are GMT +1. The time now is 02:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.