View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
zSplash
 
Posts: n/a
Default "too many data fields " error

Thanks, Peter for the help and suggestions.

Well, the only thing that looks unusual from running your sub is an
AutoMerge field, which I can't find in the doc.
Anyway, since the first page works great, I just cut everything but the
first page out of the dataSource, and then copied the first page a second
time. Should have generated 2 documents. Got the same error message, and
only one document generated.

Any other hope?

st.

"Peter Jamieson" wrote in message
...
....
However, that doesn't really help, so:
a. how many columns do you expect Word to find in the data source? Is it
60, 277, or something else?
b. If you execute the following VBA code and look at the results in the

VBE
Immediate window, does that give you any clues about what is happening?

Sub showds()
Dim objDataField As MailMergeDataField
For Each objDataField In ActiveDocument.MailMerge.DataSource.DataFields
Debug.Print objDataField.Name, objDataField.Value
Next
End Sub

Peter Jamieson
"zSplash" zNOSPAMSplash@ gci.net wrote in message
...
When I run my mail merge for a single record, I get no errors. When I

run
the mail merge with more than one record, I get a "Record contained too
many
data fields" error.

Others' help with this question suggested "usually caused by a mismatch
between the number of fields listed in the header record of the data
source
and the number of fields Word finds in the data records." I have tried

to
compare these two, but evidently they're REALLY different, unless I'm
misinterprinting the following:
MsgBox ActiveDocument.MailMerge.Fields.Count = 60
MsgBox ActiveDocument.MailMerge.DataSource.DataFields.Cou nt = 277

My delimiter is "|", and I don't believe it's anywhere it shouldn't be.
As
I've said, individual records work great, but multiple records give me
this
error, and generate only one document.

Any suggestions as to how to solve this problem?

TIA