Merge field link to database returns value w/255-character limit.

A

Austin

One specific merge field (of several distinctly-named fields) in a main Word
document is returning a 255-character-limited string of longer text from an
Excel file. Other merge fields in the document are not behaving this way;
they are returning the full contents of their Excel cells, despite the
lengths of their text values being greater than this 255-character limit.

The same behavior occurs using this particular merge field in a
newly-created test document. Is the field or its link properties corrupted
in some way?
 
P

Peter Jamieson

When Word 2002/2003 gets data from an Excel file, by default it uses the
OLEDB provider, which is "database-oriented" and wants to determine a
specific data type for each column in the worksheet. Excel can of course
have mixed data types in a single column.

So the OLEDB provider looks at the first 25 rows of each column and applies
various rules. Typically, in a "mixed" column, it will take the "majority"
data type. With some settings it will choose to use a "text" type. The
trouble is that as far as the user is concerned there is little obvious
difference between cells with text shorter than 255 characters and cells
with longer texts, but the OLEDB provider regards one as "text" and the
other as "memo". So if you have a column with mixed "text" and "memo" in the
first 25 rows, it is likely to be seen as "text" by the provider, and
truncated to 255 characters.

As far as I am aware there are no settings that will change this behaviour,
and the only way you are likely to see the full text is to revert to the DDE
connection method (check Word Tools|Options|General|"Confirm conversion at
open", go through the connection process again, and select DDE when offered.
The machine must have Excel installed for that to work.

Peter Jamieson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top