Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2016, 02:04 AM
ajh19742000 ajh19742000 is offline Using multiple IF statements on a mail merge Windows 10 Using multiple IF statements on a mail merge Office 2013
Novice
Using multiple IF statements on a mail merge
 
Join Date: Dec 2015
Posts: 10
ajh19742000 is on a distinguished road
Default Using multiple IF statements on a mail merge

Hello,
I am trying to produce a letter to send out to our clients that uses an IF statement. For example if a field says Art and Design and would like the merge to enter specific text. If the same field says Performing Arts then display different text. How is this done within the document? Additionally can this be saved as a template?

Thanks
Andy
Reply With Quote
  #2  
Old 11-01-2016, 06:11 PM
macropod's Avatar
macropod macropod is offline Using multiple IF statements on a mail merge Windows 7 64bit Using multiple IF statements on a mail merge Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Quote:
Originally Posted by ajh19742000 View Post
I am trying to produce a letter to send out to our clients that uses an IF statement. For example if a field says Art and Design and would like the merge to enter specific text. If the same field says Performing Arts then display different text. How is this done within the document?
Simply create two IF tests, coded along the lines of:
{IF{MERGEFIELD Subject}= "Art and Design" "Art and Design text"}
{IF{MERGEFIELD Subject}= "Performing Arts" "Performing Arts text"}
or:

{IF«Subject»= "Art and Design" "Art and Design text"}
{IF«Subject»= "Performing Arts" "Performing Arts text"}

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, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the 'Insert Merge Field' dropdown. The spaces represented in the field construction are all required.
Quote:
Originally Posted by ajh19742000 View Post
Additionally can this be saved as a template?
For mailmerges, you use a mailmerge main document, not a template. Executing the merge produces whatever output (email, printout, or document) you require.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using multiple IF statements on a mail merge Multiple If statements, Jamal NUMAN Excel 16 11-15-2022 11:59 PM
Mailmerge certain text using multiple if statements Debs Mail Merge 4 06-19-2014 03:34 AM
Multiple If statements bremen22 Excel 2 10-15-2013 06:37 AM
Using multiple IF statements on a mail merge showing results of If statements in a mail merge m&co Mail Merge 3 01-06-2012 07:27 PM
Using multiple IF statements on a mail merge Multiple Mail Merge? imogul Mail Merge 1 06-24-2011 07:20 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:14 AM.


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