Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word Mail-merge to email looses BG Color on Web-Based Mail | Mailmerge | |||
I want a form field to figure a date based on the letter date. | Microsoft Word Help | |||
Possible to insert a file into Word based on a mail merge field? | Mailmerge | |||
Insert Date in Specific Format in Mail Merge | Mailmerge | |||
How to insert future date based on current date plus 14 days | Microsoft Word Help |