![]() |
#1
|
|||
|
|||
![]()
Hello and Good Morning,
New to forum, so hello and Good Morning to all! I was wondering if someone could please offer me some help. I have a mail merge using Access as a data source and I am doing a merge to an email template I have set up. I have set up the standard IF "Rules" in the word document where If the merge field = "This" insert "This Text", which works really well; however I have had to add numerous merge fields (over 20) to cover all possible text paragraphs that I may wish to insert although there are only usually 3 or 4 paragraphs that I need to add to each document. I was wondering if instead of having individual merge fields for each paragraph whether I could have just a few merge fields but set up each paragraph so it would look in any of the mergefields for the "Trigger, basically using "OR" (or some other code/ formula) So it would be a bit like this: IF mergefied_1, OR Mergfield_2, OR mergefield_3 = "Yes" "then insert this text which is relevant to yes." I could then use the same formula with another paragraph; IF mergefied_1, OR Mergfield_2, OR mergefield_3 = "No" "Then add this text which is relevant to no" Hopefully I have explained what I am looking for; I thank you in anticipation of someone offering some much needed guidance!, I have searched the internet and do not seem to be able to find an answer or possible way to do this. many thanks for your help. |
#2
|
||||
|
||||
![]()
You could use something like
{ SET A { MERGEFIELD Field1 } }{ SET B { MERGEFIELD Field2 } }{ SET C { MERGEFIELD Field3 }} { IF{ =({ IF { A } ="Yes" 1 0 }+{ IF { B } ="Yes" 1 0 }+{ IF { C } ="Yes" 1 0 }) } > 0 "then insert this text which is relevant to yes" } { IF{ =({ IF { A } ="No" 1 0 }+{ IF { B } ="No" 1 0 }+{ IF { C } ="No" 1 0 }) } > 0 "then insert this text which is relevant to No" }
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
![]()
Hello,
Thank you for your response, I must admit I am a little confused, I can follow most of it but will have to sit down and try and understand it! I will send you an update with how I get on. Thank you again for your very quick response, ![]() |
![]() |
Tags |
merge rules, using if, using or |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Alfred | Mail Merge | 2 | 05-23-2017 10:59 PM |
Learning Mail Merge Rules | lawlaw | Mail Merge | 7 | 11-01-2014 08:51 PM |
Insert Text Function-Default Cursor @ pg top | sncw | Word | 1 | 11-20-2010 03:15 PM |
Mail merge rules | Barb D | Mail Merge | 0 | 03-18-2010 08:05 AM |
![]() |
bordercollie10 | Mail Merge | 2 | 02-10-2009 12:43 PM |