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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Mail Merge - insert different phrase based on date value?
My organization prints a Saint name next to the date, and it changes based on
the date. I know I could put all these dates/Saint names in excel and do a lookup and then use the result in the mailmerge. However, is there a way to do something similar with Word - so I could insert all the dates/Saints someplace under "Insert",then be able to put the code to pull up the right value? I suppose I could build a huge nested if - but I doubt I could do a 265 one. And I guess I could build 12 - based on month so it would be somewhat more managable. I want to make this as simple as possible for the people who do the letters, and I'm afraid the excel solution would be scary for them. I'm suspecting the answer is "no way" - but before I give up, I thought I'd go to the experts! Thanks Martha |
#2
|
|||
|
|||
Mail Merge - insert different phrase based on date value?
Hi Martha,
Rather than nested IFs, which can only go 20 levels deep in Word, you can use a series of independent IFs, coded along the lines of: {IF{DATE \@ MMDD}= 0101 "Michael"} {IF{DATE \@ MMDD}= 0102 "Peter"} {IF{DATE \@ MMDD}= 0103 "John"} {IF{DATE \@ MMDD}= 0104 "Matthew"} .... {IF{DATE \@ MMDD}= 0201 "Mark"} {IF{DATE \@ MMDD}= 0202 "Luke"} {IF{DATE \@ MMDD}= 0203 "Paul"} etc In reality, you'd put these fields sequentially on the same logical line, as in: {IF{DATE \@ MMDD}= 0101 "Michael"}{IF{DATE \@ MMDD}= 0102 "Peter"}{IF{DATE \@ MMDD}= 0103 "John"}{IF{DATE \@ MMDD}= 0104 "Matthew"} .... The above field coding uses the system date to determine which name to display. If you're pulling the dates from a mailmerge, change 'DATE' to 'MERGEFIELD MyDate', where 'MyDate' is your mergefield name. Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] "Martha" wrote in message ... My organization prints a Saint name next to the date, and it changes based on the date. I know I could put all these dates/Saint names in excel and do a lookup and then use the result in the mailmerge. However, is there a way to do something similar with Word - so I could insert all the dates/Saints someplace under "Insert",then be able to put the code to pull up the right value? I suppose I could build a huge nested if - but I doubt I could do a 265 one. And I guess I could build 12 - based on month so it would be somewhat more managable. I want to make this as simple as possible for the people who do the letters, and I'm afraid the excel solution would be scary for them. I'm suspecting the answer is "no way" - but before I give up, I thought I'd go to the experts! Thanks Martha |
Thread Tools | |
Display Modes | |
|
|