Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jeff Weinman Jeff Weinman is offline
external usenet poster
 
Posts: 6
Default Mail merge maxing out?

I have an excel file with 40 rows and 90 columns. Each of those columns is
different contact or personal information. I am trying to create a form
letter that will include all 90 of those columns so that it looks like

First
Last
Address
etc.

When the merge gets to about the 40th column, it quits working and looks like

birthdate fathers_name mothers_name etc

so not continuing to go down.

Any thoughts?

Also, it is possible to have the name of the merger field (so the column
header) be automatically inserted without having to put those in ahead of
time and then placing each merge field?

Thanks

Jeff
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mail merge maxing out?

I think I've seen something similar to this reported before, but haven't
been able to replicate it with a simple example here yet (Word/Excel 2003).

Which version of Word/Excel?

How is Word connecting to Excel, and does selecting another method make any
difference? (in Word 2002/2003, check Tools|Options|General|"Confirm
conversions at open", then reconnect).

If you are in a position to e-mail a sample data file that definitely does
not work, you can despam my e-mail address



email the file to me (and preferably a sample Word file) and I'll have a
look here.

Also, it is possible to have the name of the merger field (so the column
header) be automatically inserted without having to put those in ahead of
time and then placing each merge field?


There's no automated out-of-the-box fcility, but you could
a. use a bit of VBA code to grab the field names from the mergefields and
insert them, e.g. for the body of the document only, try:

Sub InsertColumnNames()

Dim objField As Field
Dim strFieldCode() As String
Dim strFieldName As String
For Each objField In ActiveDocument.Content.Fields
If objField.Type = wdFieldMergeField Then
strFieldCode = Split(objField.Code)
strFieldName = strFieldCode(2)
If Right(strFieldName, 1) = Chr(34) Then
strFieldName = Left(strFieldName, Len(strFieldName) - 1)
End If
If Left(strFieldName, 1) = Chr(34) Then
strFieldName = Right(strFieldName, Len(strFieldName) - 1)
End If
objField.Select
Selection.Range.InsertBefore strFieldName & ": "
End If
Next

End Sub

b. Word 2003 (and 2002 I think) has a "\b" switch for the MERGEFIELD field
switch that lets you insert text before the field if it contains data. If
you only want to see the row containing the field if it is not empty, you
can use

{ MERGEFIELD "myfield" \b "myfield: " }

You could adapt the above code to do that fairly quickly, I think.

Peter Jamieson

"Jeff Weinman" wrote in message
...
I have an excel file with 40 rows and 90 columns. Each of those columns is
different contact or personal information. I am trying to create a form
letter that will include all 90 of those columns so that it looks like

First
Last
Address
etc.

When the merge gets to about the 40th column, it quits working and looks
like

birthdate fathers_name mothers_name etc

so not continuing to go down.

Any thoughts?

Also, it is possible to have the name of the merger field (so the column
header) be automatically inserted without having to put those in ahead of
time and then placing each merge field?

Thanks

Jeff



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jeff Weinman Jeff Weinman is offline
external usenet poster
 
Posts: 6
Default Mail merge maxing out?

Thanks Peter. I am using Word/Excel 2000 with XP SP2 (sorry I didn't include
that in the original question).

Thank you for the offer to look at the data. I will need to adjust some of
the info as I have some rather personal info (social security number,
passport numbers and the like). I will mock some up and send to you.

I did look through quite a number of previous posts, but didn't find
anything quite like this. Everything seemed to be about the max field size as
opposed to the max number of fields.

I am not sure what the 'connection method' means. I use the mail merge
function within word then find/open data source to connect to the excel file.
I actually imported the data into an access db to and tried merging that way
but got the same problem. With the 'Confirm conversions at open" do I sent up
the Word file then check for confirm, then close and reopen?

I have never done a VBA script, so that will be a fun exercise for me. Do I
do that code in word correct?

Thanks again. I will work on a 'public' data file for you.

Jeff

"Peter Jamieson" wrote:

I think I've seen something similar to this reported before, but haven't
been able to replicate it with a simple example here yet (Word/Excel 2003).

Which version of Word/Excel?

How is Word connecting to Excel, and does selecting another method make any
difference? (in Word 2002/2003, check Tools|Options|General|"Confirm
conversions at open", then reconnect).

If you are in a position to e-mail a sample data file that definitely does
not work, you can despam my e-mail address



email the file to me (and preferably a sample Word file) and I'll have a
look here.

Also, it is possible to have the name of the merger field (so the column
header) be automatically inserted without having to put those in ahead of
time and then placing each merge field?


There's no automated out-of-the-box fcility, but you could
a. use a bit of VBA code to grab the field names from the mergefields and
insert them, e.g. for the body of the document only, try:

Sub InsertColumnNames()

Dim objField As Field
Dim strFieldCode() As String
Dim strFieldName As String
For Each objField In ActiveDocument.Content.Fields
If objField.Type = wdFieldMergeField Then
strFieldCode = Split(objField.Code)
strFieldName = strFieldCode(2)
If Right(strFieldName, 1) = Chr(34) Then
strFieldName = Left(strFieldName, Len(strFieldName) - 1)
End If
If Left(strFieldName, 1) = Chr(34) Then
strFieldName = Right(strFieldName, Len(strFieldName) - 1)
End If
objField.Select
Selection.Range.InsertBefore strFieldName & ": "
End If
Next

End Sub

b. Word 2003 (and 2002 I think) has a "\b" switch for the MERGEFIELD field
switch that lets you insert text before the field if it contains data. If
you only want to see the row containing the field if it is not empty, you
can use

{ MERGEFIELD "myfield" \b "myfield: " }

You could adapt the above code to do that fairly quickly, I think.

Peter Jamieson

"Jeff Weinman" wrote in message
...
I have an excel file with 40 rows and 90 columns. Each of those columns is
different contact or personal information. I am trying to create a form
letter that will include all 90 of those columns so that it looks like

First
Last
Address
etc.

When the merge gets to about the 40th column, it quits working and looks
like

birthdate fathers_name mothers_name etc

so not continuing to go down.

Any thoughts?

Also, it is possible to have the name of the merger field (so the column
header) be automatically inserted without having to put those in ahead of
time and then placing each merge field?

Thanks

Jeff




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jeff Weinman Jeff Weinman is offline
external usenet poster
 
Posts: 6
Default Mail merge maxing out?

Peter,

I must need cleaner glasses, but I can't figure out which part(s) of your
email address to remove. I tried a couple and got bounced.

I am at jeffweinman at yahoo dot com. Maybe you can send to me and then I
will have you?

Jeff


If you are in a position to e-mail a sample data file that definitely does
not work, you can despam my e-mail address



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mail merge maxing out?

KillmapS

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Jeff Weinman wrote:
Peter,

I must need cleaner glasses, but I can't figure out which part(s) of
your email address to remove. I tried a couple and got bounced.

I am at jeffweinman at yahoo dot com. Maybe you can send to me and
then I will have you?

Jeff


If you are in a position to e-mail a sample data file that
definitely does not work, you can despam my e-mail address






  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mail merge maxing out?

Thanks Graham.

Peter J
"Graham Mayor" wrote in message
...
KillmapS

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Jeff Weinman wrote:
Peter,

I must need cleaner glasses, but I can't figure out which part(s) of
your email address to remove. I tried a couple and got bounced.

I am at jeffweinman at yahoo dot com. Maybe you can send to me and
then I will have you?

Jeff


If you are in a position to e-mail a sample data file that
definitely does not work, you can despam my e-mail address






  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mail merge maxing out?

I've e-mailed you.

Peter Jamieson
"Jeff Weinman" wrote in message
...
Peter,

I must need cleaner glasses, but I can't figure out which part(s) of your
email address to remove. I tried a couple and got bounced.

I am at jeffweinman at yahoo dot com. Maybe you can send to me and then I
will have you?

Jeff


If you are in a position to e-mail a sample data file that definitely
does
not work, you can despam my e-mail address





  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mail merge maxing out?

Interesting spelling of Spam

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Peter Jamieson wrote:
Thanks Graham.

Peter J
"Graham Mayor" wrote in message
...
KillmapS

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Jeff Weinman wrote:
Peter,

I must need cleaner glasses, but I can't figure out which part(s) of
your email address to remove. I tried a couple and got bounced.

I am at jeffweinman at yahoo dot com. Maybe you can send to me and
then I will have you?

Jeff


If you are in a position to e-mail a sample data file that
definitely does not work, you can despam my e-mail address




  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jeff Weinman Jeff Weinman is offline
external usenet poster
 
Posts: 6
Default Mail merge maxing out?

Odd, I didn't get a message at my yahoo account. But, thanks to Graham's
help, I have sent you a message.

Jeff

"Peter Jamieson" wrote:

I've e-mailed you.

Peter Jamieson
"Jeff Weinman" wrote in message
...
Peter,

I must need cleaner glasses, but I can't figure out which part(s) of your
email address to remove. I tried a couple and got bounced.

I am at jeffweinman at yahoo dot com. Maybe you can send to me and then I
will have you?

Jeff


If you are in a position to e-mail a sample data file that definitely
does
not work, you can despam my e-mail address






  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jeff Weinman Jeff Weinman is offline
external usenet poster
 
Posts: 6
Default Mail merge maxing out?

Thank you Graham. Now that you point it out, it is quite obvious. I really do
need to clean my glasses I guess.

Jeff

"Graham Mayor" wrote:

KillmapS

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Jeff Weinman wrote:
Peter,

I must need cleaner glasses, but I can't figure out which part(s) of
your email address to remove. I tried a couple and got bounced.

I am at jeffweinman at yahoo dot com. Maybe you can send to me and
then I will have you?

Jeff


If you are in a position to e-mail a sample data file that
definitely does not work, you can despam my e-mail address







  #11   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jeff Weinman Jeff Weinman is offline
external usenet poster
 
Posts: 6
Default Mail merge maxing out?

Peter got it for me!

I was using single and double quotes in heights 6'2" and that was causing my
problem. In retrospect, I can see from a programing standpoint that quotes
cause problems, but I didn't think of that in this instance.

Thanks for you help Peter.

Jeff
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge process is printing out extra records Mike Mailmerge 3 September 27th 06 11:12 AM
Images, Mail Merge and Text Boxes Robert_L_Ross Mailmerge 6 September 26th 06 11:58 AM
Heavy Mail Merge Application Atul Mailmerge 1 August 17th 06 02:37 PM
Word-Excel 2003 - Mail Merge Recipients problem AYager Mailmerge 2 January 11th 05 04:11 AM
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements Mark V Mailmerge 8 November 30th 04 01:31 PM


All times are GMT +1. The time now is 01:45 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"