View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Blank fields in Excel become 0 in MailMerge data file

The behaviour has not 'broken' it was deliberately changed to overcome
problems related to the rather flaky DDE data connection method that was
used in the earlier versions. Current merges (from Word 2002 on) collect
only the raw data from the data source and formatting with switches is the
best and most reliable way of dealing with formatting issues that arise.
http://www.gmayor.com/formatting_word_fields.htm

The DDE method of data connection is however still available in the
application. From the Tools menu in Word, select Options and then go to the
General tab and check the box against the "Confirm conversions at open"
item. (In Word 2007 it is Office Button Word Options Advanced General
Confirm file format conversion on open). Then when you attach the data

source to the mail merge main document, you will be given the option of
using the DDE method of connection which should read the data as you have it
formatted in the table.

--

Graham Mayor - Word MVP

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



Acharn wrote:
"Doug Robbins - Word MVP" wrote:

In the mailmerge main document, use the following If...then...Else
field construction:

{ IF { MERGEFIELD fieldthatmightbeblankname } = 0 " " { MERGEFIELD
fieldthatmightbeblankname } }

You must use Ctrl+F9 to insert each pair of field delimiters and
Alt+F9 to toggle off their display.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"edenner" wrote in message
...
The field is blank in Excel (Clear Contents) and whether formatted
as General
or Text it converts to 0 (and prints as such) when the file is
linked in MailMerge. I need it to be blank and then skipped when
printing the merged document. HELP!





This is not very workable. I have the same problem as the original
poster (OP), and my mail merge document is very large and already
contains many conditional fields. The grade reports for our school
are prepared as a mail merge document with the data maintained in MS
Excel spreadsheets. In some fields the student has an elective
option, so I use IF..THEN..ELSE Word fields to contain the choices of
different possible data base fields.

This setup worked as expected in Word 2.0, Word 3.0, Word 5.0, Office
95, Office 98, and Office 2000. The behavior is broken in Office 2003.

I have thought of trying to insert a numerical picture at the end of
the field statement, but this is making already complex statements
even harder to understand. As I recall, the picture I added was
something like "\# ####;'';''", using paired single quotes to
represent the null string.

I would really appreciate any suggestions for a simpler solution. I
have work-arounds, but they are all irritating.