Reply
 
Thread Tools Display Modes
  #1   Report Post  
Woods
 
Posts: n/a
Default assistnace with mailmerge dates from excel

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

  #2   Report Post  
Michael_Corral
 
Posts: n/a
Default

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.




--
Top Notch Admin


"Woods" wrote:

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


  #3   Report Post  
Graham Mayor
 
Posts: n/a
Default

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Woods wrote:
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



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
Excel Dates formatting in Word Paul - NottsUK Mailmerge 1 May 22nd 05 08:02 AM
Mailmerge calculated dates from Excel MervynW1954 Mailmerge 3 April 22nd 05 10:58 AM
Mailmerge on word using excel data RJP Mailmerge 4 April 11th 05 08:29 AM
Mailmerge using Excel via DDE zeph317 Mailmerge 1 February 27th 05 09:08 PM
Mailmerge from EXCEL, custom format problem TonyB Mailmerge 1 December 1st 04 04:41 PM


All times are GMT +1. The time now is 12:54 AM.

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"