Word 2010 Mail Merge

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Zaqim

Thread Starter
Joined
Jun 11, 2012
Messages
2
I am working in Microsoft Office Word 2010 on a 64 Bit Windows 7 OS. I am using Mail Merge. I am trying to make it so that if Field24 is not blank, that field will just populate. Otherwise, I need the system to look at the date the document is generated, i.e. today's date. If the date is 1/1 to 12/24, I need it to print "{ DATE \@ "yy" }-CH-". Otherwise (12/25 - 12/31), I need a prompt to pull up.

I have tried:
{ IF { MERGEFIELD Field24 } = "" "{IF {DATE \@ "MMdd" } < "1225" "{FILLIN "Case No.:" \o \d "13-CH" }" "{ MERGEFIELD Field24 }" }

And as a test:
{ IF { MERGEFIELD Field24 } = "" "{IF {DATE \@ "yyyyMMdd" } < "20121225" "{FILLIN "Case No.:" \o \d "13-CH" }" "{ MERGEFIELD Field24 }" }

I am having no issues if Field24 is populated. However, if Field24 is blank, nothing is pulling through with either of the above coding. Now, I am sure this is something I am doing, but there are several instances where what prints will be based on a date. Is it possible to do this, without delving into Macros (an area where I am completely clueless...)?
 

Zaqim

Thread Starter
Joined
Jun 11, 2012
Messages
2
Update:

I found a little more information here: http://www.gmayor.com/formatting_word_fields.htm


Below is what the site has to say on the matter. It seems to agree with what I've done. I even tried to change my DATE field to a regular MERGEFIELD populated with a date and that did not work either. I do not understand what I am doing wrong here.
Testing for events that occur before or after a certain date

When running a mail merge, you may want to test for events that happen before or after a certain date. Mail merge does not convert dates to numbers, so if you cannot automatically derive a date number from the date in the data file, as you could in (say) Excel, a different plan is called for.
Let's say the date comes into Word in the format d/MM/yyyy or 1/10/2002 (1st October 2002) from a MERGEFIELD called Start_Date. In this example, we are looking to identify records with Start_Date entries before 1st October 2002.

The above would appear the logical check, but the check treats the date as a number and identifies that number as 1, which is the first part of the number before the slash '/'. All dates other than the first of the month will be greater than 1, so all will produce the result "False".
We therefore need to display the date in numbers that represent the date in a unique way by using the date mask yyyyMMdd which displays the date as a series of digits for year month and finally day, without any breaks. This is a number that the conditional field will view as a whole.

Thus any date before 1/10/2002 would produce "True" and any other date would produce "False"
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top