For one reason and another, I have to assume you are using Word XP (2002) or
later. If you were using Word 2000 before, that would at least explain why
you are suddenly getting this problem.
In Word 2002 and later, you will not be able to get data from an Excel sheet
via DDE in a DATABASE field. That probably means that your database field
will be using OLE DB to get its data - if you insert a new database field,
then use Alt-F9 to show the contents of the database field, it will probably
be something like the following:
DATABASE \d "the full path name of your xls file with \\ separators" \c
"Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data
Source=the full path name of your xls file with \\
separators;Mode=Read;Extended Properties=\"HDR=YES;IMEX=1;\";Jet
OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB
atabase
Password=\"\";Jet OLEDB:Engine Type=35;Jet OLEDB
atabase Locking Mode=0;Jet
OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet
OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet
OLEDB:Encrypt Database=False;Jet OLEDB
on't Copy Locale on
Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet
OLEDB:SFP=False" \s "SELECT * FROM `Sheet1$`" \h
There will be some differences if you are using Word 2007.
When you get data from Excel via OLE DB, you are at the mercy of the OLE DB
provider, which tries to decide what data type is in each column and convert
everything else to that type. Although the "rules" for this are not
straightforward, blanks are only likely to be returned as 0 if
a. Excel has decided that the column they are in is numeric (which probably
means that all the first 8 cells in that column are numeric)
b. the cell either has at least one blank in it (i.e. is not completely
empty) - or perhaps the cell is getting data from elsewhere.
Unfortunately, I think your only choices
a. are "fix the data" (i.e. if there are cells with " " instead of "",
change their contents to "" or "Clear" them)
b. modify the SQL in each { DATABASE } field to process any affected
columns specially. e.g. instead of
SELECT * FROM `Sheet1$`
if you have five field f1,f2,f3,f4,f5 and f4 has the problem, try e.g.
SELECT f1,f2,f3,iif(trim(cstr(f4)) = '','',f4) as [f4], f5 FROM [Sheet1$]
where those '' in the mddle are each two single quotes.
Neither of those things is likely to be very practical in the situation you
describe, but they are theonly things I can think of, except for the
possibility that you do your merges in two steps, i.e.
a. select, then copy/paste your Excel data into a Word document
b. use that as the data source
and even that is likely to cause problems, especially if your sheet has more
than 63 columns.