Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Martha Martha is offline
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Mail-merge to email looses BG Color on Web-Based Mail Micmojav Mailmerge 4 September 18th 07 05:34 PM
I want a form field to figure a date based on the letter date. Virginia Native Microsoft Word Help 2 September 22nd 06 09:52 AM
Possible to insert a file into Word based on a mail merge field? Mark Mailmerge 1 January 13th 06 02:50 PM
Insert Date in Specific Format in Mail Merge a_ryan1972 Mailmerge 2 August 25th 05 03:52 PM
How to insert future date based on current date plus 14 days John Bakker Microsoft Word Help 1 January 31st 05 09:08 PM


All times are GMT +1. The time now is 11:19 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"