Date format in directory

G

Gossipsfrolick

Could someone please help with date format in directory? I've looked through
other postings and referred to the various links but my problem does not
quite fit in!

I help a charity with database work. The charity seeks sponsors for 3rd
World children.
Some sponsors support more than one child. Some children have more than one
sponsor - and therein lies the problem.

We have a database with all the information about the sponsors and the
children.
We need to create an updatable list for creating printing records for which
I have created a mailmerge directory in Word 2002

An excerpt from the columns:

Child's Ref. No. Child's Name Date of Birth

In each column I have to insert fields for Child 1, Child 2 and Child 3. So
the merge field for Date of Birth are:

{MERGEFIELD "Childs_date_of_birth_1"}{MERGEFIELD
"Childs_date_of_birth_2"}{MERGEFIELD "Childs_date_of_birth_3"}



I have managed to insert switches in order to remove the time of birth for
every child being midnight (!) and also prevent the Americanisation of the
date.



Everything works well if there is more than one child. If there is ONLY one
child, Word inserts today's date underneath the merged date.



So I have: (I've changed names and dates for confidentiality)



Child's Name Date of Birth

Din 03/11/1995

24/02/2005



Nyn Ti 19/03/1987

24/02/2005



Trn Ti An 29/04/1988

U Thi Han Nga 20/09/1993


Please can somebody help me get rid of the current date?

Many thanks in anticipation.



Gillian
 
G

Graham Mayor

{ MERGEFIELD Childs_date_of_birth_1 \@ "d /M/yyyy"}{ IF{ MERGEFIELD
Childs_date_of_birth_2 } <> "" " { MERGEFIELD Childs_date_of_birth_2 \@ "d
/M/yyyy"}" }{ IF{ MERGEFIELD Childs_date_of_birth_3 } <> "" " { MERGEFIELD
Childs_date_of_birth_3 \@ "d /M/yyyy"}" }

will put the three dates one after the other and nothing if dates 2 & 3
don't exist. There is one big proviso and that concerns what an empty field
produces *exactly*. If the field doesn't produce a nul, then instead of
checking for an empty field, check for a field containing the unwanted
content.

See http://www.gmayor.com/formatting_word_fields.htm and
http://www.gmayor.com/mail_merge_labels_with_word_xp.htm (especially the
bit about Excel data which for this exercise your database can be treated).

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Gossipsfrolick

Many thanks Graham. I got it going on the second attempt.
I tried adding the switches as you illustrated but it is much easier
following your instructions converting to MS Excel Worksheets via DDE. They
are beautifully clear. Thank you.

Gillian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top