Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Dates formatting in Word | Mailmerge | |||
Mailmerge calculated dates from Excel | Mailmerge | |||
Mailmerge on word using excel data | Mailmerge | |||
Mailmerge using Excel via DDE | Mailmerge | |||
Mailmerge from EXCEL, custom format problem | Mailmerge |