A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Mailmerge data source give error after 32 fields



 
 
Thread Tools Display Modes
  #1  
Old January 20th, 2010, 06:00 PM posted to microsoft.public.word.mailmerge.fields
JSBAssoc
external usenet poster
 
Posts: 1
Default Mailmerge data source give error after 32 fields

I have a simple header file i am using to create a merge document. the
entirety of the .csv file is the folowing two lines:
Finder number,Source code,Expiration date,Given by,Is gift?,Join date,Last
renewed on,Member,Membership level,Membership program,Membership
term,Membership type,Send renewal notice to,Status,Address,Address Line
1,Address Line 2,Address Line 3,Address Line 4,Address Line
5,Addressee,Age,CART,City,Contact addressee,Country,Country
abbreviation,DPC,Email address,First gift date,First name,Gender,Head of
household,Is household,Key name prefix,Last name/Organization name,LOT,Middle
name,Name,Phone number,Salutation,State,State abbreviation,Suffix,Suffix
2,Title,Title 2,ZIP
Finder number,Source code,Expiration date,Given by,Is gift?,Join
date,Last renewed on,Member,Membership level,Membership
program,Membership term,Membership type,Send renewal notice
to,Status,Address,Address Line 1,Address Line 2,Address Line
3,Address Line 4,Address Line 5,Addressee,Age,CART,City,Contact
addressee,Country,Country abbreviation,DPC,Email address,First gift
date,First name,Gender,Head of household,Is household,Key name
prefix,Last name/Organization name,LOT,Middle name,Name,Phone
number,Salutation,State,State abbreviation,Suffix,Suffix
2,Title,Title 2,ZIP

When I choose this file for my recipient list, Word (2007) cannot see the
data. Instead it lists about a dozen commas and tells me there is no data in
teh file if I select OK on the dialog.

If i knock off fields from the end until there are only 32 fields it will
work. If I take out the angle brackets from the 2nd row (the data row) so
that the tow rows are identical, it will work. I even created a 2nd file with
simply "m1, m2, ..." all the way to 50 and it worked (even with brackets on
the data row "m1, ...")

I can't figure it out. The header file is built by a separate program so I
can't change it (except for the # of fields I output).

Does anyone have any clue how I could proceed?

  #2  
Old January 20th, 2010, 07:33 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Mailmerge data source give error after 32 fields

I am pretty sure that your problem is caused by the spaces in the field
names (the first row in your data source) that causes Word substitute a
default field name for them and that it only accommodates 32 default field
names.

That would explain why your m1,m2 up to m50 works (i.e. no spaces)

So try deleting the spaces from the field names in the first row. Note, if
your data also contains spaces, you may need to enclose each field in ""
Particularly if some of the data contains commas, such as Pickering, Jr

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"JSBAssoc" wrote in message
...
I have a simple header file i am using to create a merge document. the
entirety of the .csv file is the folowing two lines:
Finder number,Source code,Expiration date,Given by,Is gift?,Join date,Last
renewed on,Member,Membership level,Membership program,Membership
term,Membership type,Send renewal notice to,Status,Address,Address Line
1,Address Line 2,Address Line 3,Address Line 4,Address Line
5,Addressee,Age,CART,City,Contact addressee,Country,Country
abbreviation,DPC,Email address,First gift date,First name,Gender,Head of
household,Is household,Key name prefix,Last name/Organization
name,LOT,Middle
name,Name,Phone number,Salutation,State,State abbreviation,Suffix,Suffix
2,Title,Title 2,ZIP
Finder number,Source code,Expiration date,Given by,Is
gift?,Join
date,Last renewed on,Member,Membership level,Membership
program,Membership term,Membership type,Send renewal notice
to,Status,Address,Address Line 1,Address Line 2,Address Line
3,Address Line 4,Address Line
5,Addressee,Age,CART,City,Contact
addressee,Country,Country abbreviation,DPC,Email address,First
gift
date,First name,Gender,Head of household,Is household,Key name
prefix,Last name/Organization name,LOT,Middle name,Name,Phone
number,Salutation,State,State abbreviation,Suffix,Suffix
2,Title,Title 2,ZIP

When I choose this file for my recipient list, Word (2007) cannot see the
data. Instead it lists about a dozen commas and tells me there is no data
in
teh file if I select OK on the dialog.

If i knock off fields from the end until there are only 32 fields it will
work. If I take out the angle brackets from the 2nd row (the data row) so
that the tow rows are identical, it will work. I even created a 2nd file
with
simply "m1, m2, ..." all the way to 50 and it worked (even with brackets
on
the data row "m1, ...")

I can't figure it out. The header file is built by a separate program so I
can't change it (except for the # of fields I output).

Does anyone have any clue how I could proceed?

  #3  
Old January 21st, 2010, 12:39 AM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Mailmerge data source give error after 32 fields

Another possibility might be to check Word Office Button-Word
Options-Advanced-General-Confirm File Format Conversion on Open, go
through the data source selection process again, then select the
OLE Db Database Files option when it is offered, and select the "Comma"
delimiter (twice). Word then uses an OLE DB provider either Access/Jet
or Access/Ace to open the data source.

However, if you are opening your document programmatically from outside
Word, that is not enough, because Word does not re-open the connection
automatically, and if you use e.g.

Activedocument.Mailmerge.OpenDataSource Name:="the full pathname of
your .csv"

Word will probably prompt for the field delimiters again. AFAIK you then
have to use a .odc file to open your data source - e.g. with an empty
file called empty.odc you can try

ActiveDocument.MailMerge.OpenDataSource _
Name:="C:\mycsvs\mycsv.csv", _
Connection:="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\C:\mycsvs;Mode=Read;Extended Properties=""HDR=YES;"";Jet
OLEDB:Engine Type=96;", _
sqlstatement:="SELECT * FROM [mycsv.csv]"

In this case, the OLE DB provider seems to manage to detect that the
delimiter is a "," automatically, but to be sure you may need a little
more. But that can wait for now...

Peter Jamieson

http://tips.pjmsn.me.uk

On 20/01/2010 18:00, JSBAssoc wrote:
I have a simple header file i am using to create a merge document. the
entirety of the .csv file is the folowing two lines:
Finder number,Source code,Expiration date,Given by,Is gift?,Join date,Last
renewed on,Member,Membership level,Membership program,Membership
term,Membership type,Send renewal notice to,Status,Address,Address Line
1,Address Line 2,Address Line 3,Address Line 4,Address Line
5,Addressee,Age,CART,City,Contact addressee,Country,Country
abbreviation,DPC,Email address,First gift date,First name,Gender,Head of
household,Is household,Key name prefix,Last name/Organization name,LOT,Middle
name,Name,Phone number,Salutation,State,State abbreviation,Suffix,Suffix
2,Title,Title 2,ZIP
Finder number,Source code,Expiration date,Given by,Is gift?,Join
date,Last renewed on,Member,Membership level,Membership
program,Membership term,Membership type,Send renewal notice
to,Status,Address,Address Line 1,Address Line 2,Address Line
3,Address Line 4,Address Line 5,Addressee,Age,CART,City,Contact
addressee,Country,Country abbreviation,DPC,Email address,First gift
date,First name,Gender,Head of household,Is household,Key name
prefix,Last name/Organization name,LOT,Middle name,Name,Phone
number,Salutation,State,State abbreviation,Suffix,Suffix
2,Title,Title 2,ZIP

When I choose this file for my recipient list, Word (2007) cannot see the
data. Instead it lists about a dozen commas and tells me there is no data in
teh file if I select OK on the dialog.

If i knock off fields from the end until there are only 32 fields it will
work. If I take out the angle brackets from the 2nd row (the data row) so
that the tow rows are identical, it will work. I even created a 2nd file with
simply "m1, m2, ..." all the way to 50 and it worked (even with brackets on
the data row "m1, ...")

I can't figure it out. The header file is built by a separate program so I
can't change it (except for the # of fields I output).

Does anyone have any clue how I could proceed?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.