Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Joshua
 
Posts: n/a
Default Can Mail Merge include a space at the beginning of a field?

I'm performing a Mail Merge that combines text stored in Excel into a Word
doc. Each field contains 255 characters (max for mail merge) and once in
Word, the fields are combined to create paragraphs.

Here's the problem. Some fields begin the a space. Mail Merge removes this
space. By removing the space, it causes the last word of the previous field
to combine with the first word of the field with the space.

How do I get Mail Merge to recognize and include a space at the beginning of
the field?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Can Mail Merge include a space at the beginning of a field?

Use a \b switch on the field to place the space (though why can't you simply
insert the space manually or conditionally between the fields?)

eg { MERGEFIELD First_Name }{ MERGEFIELD Last_Name \b " " }
will put a space between the fields.

--

Graham Mayor - Word MVP

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


Joshua wrote:
I'm performing a Mail Merge that combines text stored in Excel into a
Word doc. Each field contains 255 characters (max for mail merge)
and once in Word, the fields are combined to create paragraphs.

Here's the problem. Some fields begin the a space. Mail Merge removes
this space. By removing the space, it causes the last word of the
previous field to combine with the first word of the field with the
space.

How do I get Mail Merge to recognize and include a space at the
beginning of the field?



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Joshua
 
Posts: n/a
Default Can Mail Merge include a space at the beginning of a field?

Thanks, Graham...I appreciate it. I can't manually insert a space, or use
the \b switch. Here's why. Imagine this set up.

My columns in excel contain paragraphs broken into 255 character chunks. In
the word doc, I have multiple merge fields that essentially rebuild the
paragraphs, 255 characters at a time. Since I have multiple records, some of
the fields begin with a space and some don't. For those that do begin with a
space, Mail Merge doesn't insert the space at the beginning.

Example one trouble record:
In excel
Field_One ends with - "...while the"
Field_Two begins with - " focus of..." (notice the space before focus).

In word:
My merge fields are stacked in word like this...with no space in between.
{ MERGEFIELD Field_One }{ MERGEFIELD Field_Two }

The merged result looks like this:
"...while thefocus of..." (notice no space between the and focus)

Do you have any ideas how to fix this? I can't add the space manually as it
would have this effect on other records (eg.."fo cus").

"Graham Mayor" wrote:

Use a \b switch on the field to place the space (though why can't you simply
insert the space manually or conditionally between the fields?)

eg { MERGEFIELD First_Name }{ MERGEFIELD Last_Name \b " " }
will put a space between the fields.

--

Graham Mayor - Word MVP

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


Joshua wrote:
I'm performing a Mail Merge that combines text stored in Excel into a
Word doc. Each field contains 255 characters (max for mail merge)
and once in Word, the fields are combined to create paragraphs.

Here's the problem. Some fields begin the a space. Mail Merge removes
this space. By removing the space, it causes the last word of the
previous field to combine with the first word of the field with the
space.

How do I get Mail Merge to recognize and include a space at the
beginning of the field?




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Can Mail Merge include a space at the beginning of a field?

I have tested this and the only time that the space is skipped is when the
DDE method of connection to the data is used. Ff you use the Excel converter
(grab it from my web site if yours doesn't work) the space is retained.

From the Tools menu in Word, select Options and then go to the General tab
and check the box against the "Confirm conversions at open" item. Then when
you attach the data source to the mail merge main document, you will be
given the option of using the alternative methods of connection.

--

Graham Mayor - Word MVP

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


Joshua wrote:
Thanks, Graham...I appreciate it. I can't manually insert a space,
or use the \b switch. Here's why. Imagine this set up.

My columns in excel contain paragraphs broken into 255 character
chunks. In the word doc, I have multiple merge fields that
essentially rebuild the paragraphs, 255 characters at a time. Since
I have multiple records, some of the fields begin with a space and
some don't. For those that do begin with a space, Mail Merge doesn't
insert the space at the beginning.

Example one trouble record:
In excel
Field_One ends with - "...while the"
Field_Two begins with - " focus of..." (notice the space before
focus).

In word:
My merge fields are stacked in word like this...with no space in
between. { MERGEFIELD Field_One }{ MERGEFIELD Field_Two }

The merged result looks like this:
"...while thefocus of..." (notice no space between the and focus)

Do you have any ideas how to fix this? I can't add the space manually
as it would have this effect on other records (eg.."fo cus").

"Graham Mayor" wrote:

Use a \b switch on the field to place the space (though why can't
you simply insert the space manually or conditionally between the
fields?)

eg { MERGEFIELD First_Name }{ MERGEFIELD Last_Name \b " " }
will put a space between the fields.

--

Graham Mayor - Word MVP

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


Joshua wrote:
I'm performing a Mail Merge that combines text stored in Excel into
a Word doc. Each field contains 255 characters (max for mail
merge) and once in Word, the fields are combined to create
paragraphs.

Here's the problem. Some fields begin the a space. Mail Merge
removes this space. By removing the space, it causes the last word
of the previous field to combine with the first word of the field
with the space.

How do I get Mail Merge to recognize and include a space at the
beginning of the field?



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Joshua
 
Posts: n/a
Default Can Mail Merge include a space at the beginning of a field?

Graham, I really appreciate your help. I tried your technique and mail merge
only picked up my first 63 fields. Of those fields...it only showed blank
lines. It didn't pick up any text and didn't recognize the rest of my fields.
So, I downloaded your Excel converter and it still didn't work.

Do you know of any other way to keep mail merge from "trimming" spaces?
It's trimming spaces off the front and the back.

Thanks,
Josh

"Graham Mayor" wrote:

I have tested this and the only time that the space is skipped is when the
DDE method of connection to the data is used. Ff you use the Excel converter
(grab it from my web site if yours doesn't work) the space is retained.

From the Tools menu in Word, select Options and then go to the General tab
and check the box against the "Confirm conversions at open" item. Then when
you attach the data source to the mail merge main document, you will be
given the option of using the alternative methods of connection.

--

Graham Mayor - Word MVP

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


Joshua wrote:
Thanks, Graham...I appreciate it. I can't manually insert a space,
or use the \b switch. Here's why. Imagine this set up.

My columns in excel contain paragraphs broken into 255 character
chunks. In the word doc, I have multiple merge fields that
essentially rebuild the paragraphs, 255 characters at a time. Since
I have multiple records, some of the fields begin with a space and
some don't. For those that do begin with a space, Mail Merge doesn't
insert the space at the beginning.

Example one trouble record:
In excel
Field_One ends with - "...while the"
Field_Two begins with - " focus of..." (notice the space before
focus).

In word:
My merge fields are stacked in word like this...with no space in
between. { MERGEFIELD Field_One }{ MERGEFIELD Field_Two }

The merged result looks like this:
"...while thefocus of..." (notice no space between the and focus)

Do you have any ideas how to fix this? I can't add the space manually
as it would have this effect on other records (eg.."fo cus").

"Graham Mayor" wrote:

Use a \b switch on the field to place the space (though why can't
you simply insert the space manually or conditionally between the
fields?)

eg { MERGEFIELD First_Name }{ MERGEFIELD Last_Name \b " " }
will put a space between the fields.

--

Graham Mayor - Word MVP

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


Joshua wrote:
I'm performing a Mail Merge that combines text stored in Excel into
a Word doc. Each field contains 255 characters (max for mail
merge) and once in Word, the fields are combined to create
paragraphs.

Here's the problem. Some fields begin the a space. Mail Merge
removes this space. By removing the space, it causes the last word
of the previous field to combine with the first word of the field
with the space.

How do I get Mail Merge to recognize and include a space at the
beginning of the field?






  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Can Mail Merge include a space at the beginning of a field?

Sorry, but I have run out of ideas with the data file as it currently
exists. I don't know why you have all these texts in the Excel file, but
would it be possible to use those text fields to point to external files
then use the content to insert autotext or document files? The procedure is
similar to http://www.gmayor.com/mail_merge_graphics.htm

--

Graham Mayor - Word MVP

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


Joshua wrote:
Graham, I really appreciate your help. I tried your technique and
mail merge only picked up my first 63 fields. Of those fields...it
only showed blank lines. It didn't pick up any text and didn't
recognize the rest of my fields. So, I downloaded your Excel
converter and it still didn't work.

Do you know of any other way to keep mail merge from "trimming"
spaces?
It's trimming spaces off the front and the back.

Thanks,
Josh

"Graham Mayor" wrote:

I have tested this and the only time that the space is skipped is
when the DDE method of connection to the data is used. Ff you use
the Excel converter (grab it from my web site if yours doesn't work)
the space is retained.

From the Tools menu in Word, select Options and then go to the
General tab and check the box against the "Confirm conversions at
open" item. Then when you attach the data source to the mail merge
main document, you will be given the option of using the alternative
methods of connection.

--

Graham Mayor - Word MVP

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


Joshua wrote:
Thanks, Graham...I appreciate it. I can't manually insert a space,
or use the \b switch. Here's why. Imagine this set up.

My columns in excel contain paragraphs broken into 255 character
chunks. In the word doc, I have multiple merge fields that
essentially rebuild the paragraphs, 255 characters at a time. Since
I have multiple records, some of the fields begin with a space and
some don't. For those that do begin with a space, Mail Merge doesn't
insert the space at the beginning.

Example one trouble record:
In excel
Field_One ends with - "...while the"
Field_Two begins with - " focus of..." (notice the space before
focus).

In word:
My merge fields are stacked in word like this...with no space in
between. { MERGEFIELD Field_One }{ MERGEFIELD Field_Two }

The merged result looks like this:
"...while thefocus of..." (notice no space between the and focus)

Do you have any ideas how to fix this? I can't add the space
manually as it would have this effect on other records (eg.."fo
cus").

"Graham Mayor" wrote:

Use a \b switch on the field to place the space (though why can't
you simply insert the space manually or conditionally between the
fields?)

eg { MERGEFIELD First_Name }{ MERGEFIELD Last_Name \b " " }
will put a space between the fields.

--

Graham Mayor - Word MVP

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


Joshua wrote:
I'm performing a Mail Merge that combines text stored in Excel
into a Word doc. Each field contains 255 characters (max for
mail merge) and once in Word, the fields are combined to create
paragraphs.

Here's the problem. Some fields begin the a space. Mail Merge
removes this space. By removing the space, it causes the last word
of the previous field to combine with the first word of the field
with the space.

How do I get Mail Merge to recognize and include a space at the
beginning of the field?



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
NO CODE - mail merge to Outlook with attachment with CC BrianH Mailmerge 1 February 10th 10 02:53 PM
Adding a field to an Off 97 mail merge using Office Pro 2003 TomC Mailmerge 1 January 5th 06 08:00 AM
How to identify and correct mail merge 'field calculation errors' Janet2357 Mailmerge 0 September 8th 05 07:15 PM
How to stop Word from truncating data in an mail merge field? Hope Hare Mailmerge 1 September 8th 05 07:07 PM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM


All times are GMT +1. The time now is 10:42 PM.

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"