assistnace with mailmerge dates from excel

W

Woods

I have a main word document merging a record label from an excel
worksheet. The merge is successful for all fields that are text fields
but i am having a problems with date fields, they are merging correctly
but when the date field is empty the merge field is filled with a
default date of today's date.

I'm using word 2002 SP3 and the same version of excel. The excel
worksheet is being populated by a VB.NET app were all the required
printed record labels are selected. The app fills the excel sheet with
all the appropriate data fields and retains there format, ie date_to is
date format and Name is string ect.

When a text field is empty nothing is passed to the main merge document
but when a date field is empty a default date is passed.

THe date fields have been causing a few problems and any info would be
much appreciated. Thanks
 
M

Michael_Corral

Here is some info that I hope is helpful.

Inside Word, you can use “if†Word fields and that gives you several
options. You could also format the cells that contain the dates in Excel
too, and try different ways. You can also enter a character, maybe an *, in
the spots in Excel that have no date, then use the Find and Replace options
to replace * with what ever you want or replace * with the formatting of
white Font Color and they will not be printed. In Excel to insert a
character into the blank fields, there are several ways to do this quickly,
Auto Filter and paste into the blank cells, or Find and Replace, and I am
sure there are other ways, but this way is easy and should work for you.
 
G

Graham Mayor

You need to error trap the fields for the missing information using a
conditional field eg

{IF{Mergefield Datefieldname} <> "" "{Mergefield Datefieldname}"}
or just possibly
{IF{Mergefield Datefieldname \@ "yyyyMMdd"} > 18991230 "{Mergefield
Datefieldname}"}

The second example checks against a default date of 30 Dec 1899. If a
different date is inserted for an empty field insert that in the same
format.

See also http://www.gmayor.com/formatting_word_fields.htm

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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