| | |
Word 2007 adds extra spaces in mail merge
![]() |
The problem that I am facing is that Word 2007 is adding spaces in a mail merge when there isn't a value from an excel document.
<<FirstName>> <<MiddleName>> <<LastName>>
I've placed spaces in between the template place holders to seperate the names. However, when a record doesn't have a middle name, there will be two spaces in between the first and last name. I remember previous versions of word removing the "extra" spaces in the past. However 2007 doesn't do this for me automatically, instead it adds an extra space when the datasource is blank/null.
Has anyone else seen this happen?
Thanks in advance
<<FirstName>> <<MiddleName>> <<LastName>>
I've placed spaces in between the template place holders to seperate the names. However, when a record doesn't have a middle name, there will be two spaces in between the first and last name. I remember previous versions of word removing the "extra" spaces in the past. However 2007 doesn't do this for me automatically, instead it adds an extra space when the datasource is blank/null.
Has anyone else seen this happen?
Thanks in advance
If in doubt, reach into the trash can and remove the user guide.
Before you start your merge, do the following:
1. Right click any white space in your document and select Paragraph
2 The Paragraph properties will pop up.
3. Select “Don’t add space between paragraphs of the same style”
4. Click OK, Continue your merge.
1. Right click any white space in your document and select Paragraph
2 The Paragraph properties will pop up.
3. Select “Don’t add space between paragraphs of the same style”
4. Click OK, Continue your merge.
Michael
Forensic IT Consultant / Designer | My DaniWeb Blog
Quis custodiet ipsos custodes?
Forensic IT Consultant / Designer | My DaniWeb Blog
Quis custodiet ipsos custodes?
Actually this doesn't fix what I'm working with. However it does fix that extra line that is created when hitting the enter key. We had another fix, which is to change the style to use word 2003 instead of 2007. Thanks for showing me how to fix that the right way.
My problem comes from doing a mail merge from an excel list of addresses to several lables. The template is like so.
<<first_name>>_<<middle_name>>_<<last_name>>
Where the underscore between the arrows represents one spacing since the arrows makes it hard to see them. Now when we merge the document with the data from excel, an extra space is created if for say middle_name is null or empty. How do I prevent extra spaces from showing up between field names. This use to not happen in Word 2003. Any ideas?
Thanks
My problem comes from doing a mail merge from an excel list of addresses to several lables. The template is like so.
<<first_name>>_<<middle_name>>_<<last_name>>
Where the underscore between the arrows represents one spacing since the arrows makes it hard to see them. Now when we merge the document with the data from excel, an extra space is created if for say middle_name is null or empty. How do I prevent extra spaces from showing up between field names. This use to not happen in Word 2003. Any ideas?
Thanks
If in doubt, reach into the trash can and remove the user guide.
You might have to use an IF field
{ IF { MERGEFIELD Title } = "" "" "{ MERGEFIELD Title } " }{ IF { MERGEFIELD FirstName } = "" "" "{ MERGEFIELD FirsName } " }
So if title is blank, add nothing, if not, title and space AFTER. The double quotes acts as a NULL-SPACE "" where " " would be a space.
You could also do a Find and Replace for double spaces, in find press space bar twice, in replace press once or leave blank.
If your using Excel for the data source, Insert a column and name the field "Full Name." Fill down the column with the following formula:
hope this helps.
{ IF { MERGEFIELD Title } = "" "" "{ MERGEFIELD Title } " }{ IF { MERGEFIELD FirstName } = "" "" "{ MERGEFIELD FirsName } " }
So if title is blank, add nothing, if not, title and space AFTER. The double quotes acts as a NULL-SPACE "" where " " would be a space.
You could also do a Find and Replace for double spaces, in find press space bar twice, in replace press once or leave blank.
If your using Excel for the data source, Insert a column and name the field "Full Name." Fill down the column with the following formula:
=TRIM(SUBSTITUTE(CONCATENATE(A2, " ", B2, " ", C2), " ", " "))
Michael
Forensic IT Consultant / Designer | My DaniWeb Blog
Quis custodiet ipsos custodes?
Forensic IT Consultant / Designer | My DaniWeb Blog
Quis custodiet ipsos custodes?
![]() |
Other Threads in the Windows Software Forum
- Previous Thread: Error Received When Trying To Create DSN From The Command Line
- Next Thread: Problem with mouse
| Thread Tools | Search this Thread |
acquisition acquisitions agile albany applications apps asp bailout ballmer beta billgates binary blackberry bostock browser budapest business cisco creativesuite4 development download ebay economicgrowth economy email excel exchange facebook freesoftware gaming gay google gta halo hard hp htc ibm icahn ie8 intel internet java jobs law linux mac merger microsoft microsoftoffice mobile net news nintendo novell office officefileformats officesuites openoffice openoffice.org opensource opensuse os outlook patent pfizer piracy redhat rim screen security sex siliconvalley software softwaretest sony survey takeover techwriting timetracking timewardenltd. training twitter virtualization vista vmware web wii windows windows7 windowslive wordpress work xbox xbox360 yahoo yahoo! yang zephyr2 zoho






