Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2020, 02:50 PM
shawn.low@cox.net shawn.low@cox.net is offline Multiple Merge Field in an "IF" Statement Windows 10 Multiple Merge Field in an "IF" Statement Office 2016
Novice
Multiple Merge Field in an "IF" Statement
 
Join Date: May 2019
Location: Aliso Viejo, CA.
Posts: 24
shawn.low@cox.net is on a distinguished road
Default Multiple Merge Field in an "IF" Statement

When using an "IF" Statement in a Word Doc, is it possible to have the IF statement reference multiple Merge Fields?




The IF statement needs to check and see if there is a Date in the field "Rescission Date" field is SFDC, and if there is, the IF Statement then needs to check a different field, Called "State" and check for the State being CA.

If there IS a Rescission Date, AND the State IS NOT CA, then print the paragraph, else leave the paragraph off the document.


Basically, is this logic below correct?


{IF {MERGEFIELD Opportunity_Rescission_Date \*MERGEFOREMAT} <> "" {IF {MERGEFIELD Opportunity_State \* MERGEFOREMAT} <> "CA" "Text" ""}}


Cheers,
Shawn
Reply With Quote
  #2  
Old 01-24-2020, 11:05 PM
macropod's Avatar
macropod macropod is offline Multiple Merge Field in an &quot;IF&quot; Statement Windows 7 64bit Multiple Merge Field in an &quot;IF&quot; Statement Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

All you need is:
{IF{MERGEFIELD Opportunity_Rescission_Date}<> "" {IF{MERGEFIELD Opportunity_State}<> "CA" "Text"}}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-27-2020, 09:46 AM
shawn.low@cox.net shawn.low@cox.net is offline Multiple Merge Field in an &quot;IF&quot; Statement Windows 10 Multiple Merge Field in an &quot;IF&quot; Statement Office 2016
Novice
Multiple Merge Field in an &quot;IF&quot; Statement
 
Join Date: May 2019
Location: Aliso Viejo, CA.
Posts: 24
shawn.low@cox.net is on a distinguished road
Default Multiple Merge Fields in an "IF" Statement

So my formula is correct?
Reply With Quote
  #4  
Old 01-27-2020, 02:07 PM
macropod's Avatar
macropod macropod is offline Multiple Merge Field in an &quot;IF&quot; Statement Windows 7 64bit Multiple Merge Field in an &quot;IF&quot; Statement Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Not quite. Leaving aside the unnecessary (though not 'incorrect') use of the '\*MERGEFOREMAT' switches, inclusion of the final "" in your field construction was incorrect. You also had more spaces in the field construction than are absolutely necessary, but their inclusion is neither 'correct' nor 'incorrect'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Merge Field in an &quot;IF&quot; Statement Mail Merge Using Rules "IF" to add additional Text Based On Merge Field Content Alfred Mail Merge 2 05-23-2017 10:59 PM
Error: "Changes made were lost...reconnect with server", when switching "from" field randhurrle Outlook 2 02-25-2015 06:51 PM
Multiple Merge Field in an &quot;IF&quot; Statement Word options "field shading" reverts to "when selected" PaulBurcham Word 1 04-20-2013 11:18 AM
Multiple Merge Field in an &quot;IF&quot; Statement Applying "Paper Source" settings to multiple sections in a mail merge does not apply ChrisC Mail Merge 1 06-18-2012 07:11 PM
merge field formatting problem with "text to be inserted before" wissam Mail Merge 0 12-13-2009 12:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft