Word maximum no of fields in MailMerge

M

Myles

We have encountered an interesting issue when doing stress testing on
an Add-In that we have developed. Its an Add-In written in Delphi and
has been working fine with Word in the past. Recently, as a result of
some stress testing on a new version of our Add-In by a client, we
were told that after they had selected 37 mail merge fields for a
document to be merged, they were getting strange errors including an
OLEException 'String is longer than 255 characters'.

I did some research on this and found others who had experienced
similar issues. It appears to be due to the way that Word works when
the datasource used for a Mailmerge is internal to MS Word. What I
noticed is that when we prep our data to be the datasource for a Word
merge, it basically takes it and creates a table of the data (I'm
testing this in Word 2003 but it appears to act the same in Word
2007). When fewer fields are used in a merge, the table is created
correctly and the merge succeeds. But when we hit these higher
numbers, the tables will not create, and therefore attempting to use
that data as the data source causes error dialogs in Word relating to
'Invalid Headers' or something like that. Clearly the datasource is
the culprit.

What I'm trying to determine is what defines the upper boundaries for
internal datasources for Word merge? We are only ever merging with
one row in there, but the number of columns can be high. Is this
measured in terms of byte size, or number of columns, etc.? Some of
the tests we have encountered appears to allow up to 44 columns, but
it depends on what columns were selected for the merge, and/or the
size of the data being merged.

I'd certainly appreciate anyone with some experience in these upper
limits to chime in on this.

Thanks
Myles
 
C

Cindy M.

Hi Myles,
What I'm trying to determine is what defines the upper boundaries for
internal datasources for Word merge? We are only ever merging with
one row in there, but the number of columns can be high. Is this
measured in terms of byte size, or number of columns, etc.? Some of
the tests we have encountered appears to allow up to 44 columns, but
it depends on what columns were selected for the merge, and/or the
size of the data being merged.
The maximum size of a Word table in the versions you mention is 63
columns.

Besides that, there can be issues with delimited text format under
certain circumstances. Peter Jamieson, who mainly frequents the
word.mailmerge.fields newsgroup, has done some intensive research on
that and can probably outline the things he's found that makes that
kind of a data source problematical.

Beyond that, there's really no limit to the number of fields as far as
WORD is concerned. There can be issues using certain kinds of data
connection methods if the *content* of a field contains more than 255
characters (a memo field). However, I don't get the impression that
you're using the Jet engine as a connection method?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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