View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Unexpected results in mailmerge

When Word opens as a standalone document, it isn't looking for any
structure, except in the sense that it will try to determine a file type
to decide which text converter - internal or external - to use.

However, when Word opens a file as a data source, it
a. is looking for a specific structure (tabular, with the same number
of columns in each row) and - to an extent - looking for different types
of data in each column
b. may be using methods to read the file that it does not use when it
opens the file as a document (for example, it may use the OLE DB Jet/ACE
provider, the ODBC Jet/ACE driver, or one of the text converters).

Off the top of my head I won't try to guess how Word will try to open a
..out file (you may find that changing the extension to .csv, .txt etc.
may make a difference because some "connection methods" will only work
with files with certain extensions, even when the content is identical).

Peter Jamieson

http://tips.pjmsn.me.uk

dan wrote:
Thanks Peter, I'll give those things a try. As additional information, I
wrongly stated the file is CSV but it is actually tab delimited.
But what's interesting, if I just open the export file (it's name is
dtxml26.out) with Word from a network computer (the file is on a server), I
can see all the records. However, if I try to do a mailmerge in Word on that
same workstation, using that same file as the datasource, I only get the
records up to 186. So in one case Word sees the whole dataset but in
mailmerge mode it doesn't. I guess this supports the theory that there are
oddities in the dataset?

"Peter Jamieson" wrote in message
...
1. As a workaround, consider opening the data source in Word, using
convert text to table to convert it to a table (if it doesn't have more
than the permitted number of columns in Word), ensure there is a row with
column names at the top, save that as a .doc, and use that as a
datasource.

2. for troubleshooting, I would first look for "oddities" in/around record
186, such as
- accented/"international" characters
- double quote characters in the data (if there are any, they typically
need to be doubled up)
- other delimiter characters such as commas in the data


Peter Jamieson

http://tips.pjmsn.me.uk

dan wrote:
I've got a line of business application (Dentrix for dental offices)
exporting a set of data for use by Word (in this case word 2007) to
create mailmerge letters. I can look at the exported datafile from within
Dentrix and it shows all the records (about 250 names in this case, last
one being a name starting with Z). When I run the mailmerge to Word 2007,
after I've chosen the recipients and choose to edit recipients, I see
there are only 186 records, the last one being a name starting with R.
Word doesn't seem to be acknowledging all the data in the file, which
appears to be in CSV format. The result is repeatable, and also occurs
with Word 2003.
Any thoughts on how I can troubleshoot this? Since it's a handoff, I'm
getting a run around from Dentrix support. TIA