Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-21-2018, 05:01 PM
macropod's Avatar
macropod macropod is offline Conditional checkbox mailmerge: coding "or" statements within IF statements Windows 7 64bit Conditional checkbox mailmerge: coding "or" statements within IF statements Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,516
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

Try field coding based on:
{IF{={IF{MERGEFIELD LABTEST1}= "Culture" 1 0}*({IF{MERGEFIELD DISEASE}= "Campylobacter" 1 0}+{IF{MERGEFIELD DISEASE}= "STEC" 1 0}+{IF{MERGEFIELD DISEASE}= "Salmonella" 1 0}+{IF{MERGEFIELD DISEASE}= "Shigella" 1 0}+{IF{MERGEFIELD DISEASE}= "Yersinia" 1 0})}> 0 "Checked" "Unchecked"}
or:
{IF{={IF«LABTEST1»= "Culture" 1 0}*({IF«DISEASE»= "Campylobacter" 1 0}+{IF«DISEASE»= "STEC" 1 0}+{IF«DISEASE»= "Salmonella" 1 0}+{IF«DISEASE»= "Shigella" 1 0}+{IF«DISEASE»= "Yersinia" 1 0})}> 0 "Checked" "Unchecked"}

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either). The spaces represented in the field constructions are all required.

In the Mailmerge Tips and Tricks 'Sticky' thread at the top of this forum (https://www.msofficeforums.com/mail-...ps-tricks.html) you'll find a macro under the heading Convert Text Representations of Fields to Working Fields that will convert either of the above into a working field code.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
check boxes, conditional merge fields, mailmerge field



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional checkbox mailmerge: coding "or" statements within IF statements legacy form fields conditional statements steelcity79 Word 3 05-05-2018 04:02 AM
Conditional checkbox mailmerge: coding "or" statements within IF statements saving conditional statements notalec Mail Merge 7 10-16-2017 09:34 PM
I know nothing about mail merge, but need help with conditional statements briyosa Word 1 03-27-2017 10:17 PM
Mailmerge certain text using multiple if statements Debs Mail Merge 4 06-19-2014 03:34 AM
"IF" "THEN" statements in Macros mfgeng_iss Misc 0 10-04-2007 07:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:13 PM.


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