Word 2007 adds extra spaces in mail merge

Reply

Join Date: Dec 2004
Posts: 149
Reputation: Geek-Master is an unknown quantity at this point 
Solved Threads: 6
Geek-Master's Avatar
Geek-Master Geek-Master is offline Offline
Junior Poster

Word 2007 adds extra spaces in mail merge

 
0
  #1
Jan 27th, 2008
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
If in doubt, reach into the trash can and remove the user guide.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 270
Reputation: Michael_Knight is an unknown quantity at this point 
Solved Threads: 12
Michael_Knight's Avatar
Michael_Knight Michael_Knight is offline Offline
Posting Whiz in Training

Re: Word 2007 adds extra spaces in mail merge

 
0
  #2
Jan 29th, 2008
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.
Michael
Forensic IT Consultant / Designer | My DaniWeb Blog
Quis custodiet ipsos custodes?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 149
Reputation: Geek-Master is an unknown quantity at this point 
Solved Threads: 6
Geek-Master's Avatar
Geek-Master Geek-Master is offline Offline
Junior Poster

Re: Word 2007 adds extra spaces in mail merge

 
0
  #3
Feb 4th, 2008
I noticed that I can also default that setting for future documents.

Thanks I'll try it out.
If in doubt, reach into the trash can and remove the user guide.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,294
Reputation: bobbyraw is an unknown quantity at this point 
Solved Threads: 95
bobbyraw's Avatar
bobbyraw bobbyraw is offline Offline
Nearly a Posting Virtuoso

Re: Word 2007 adds extra spaces in mail merge

 
0
  #4
Feb 4th, 2008
you can also clicl on the paragraph icons in word, believe it's the second one from the default ( at work Now so i am not using 2007) but use at home. its the same thing when you try to type a regular document.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 149
Reputation: Geek-Master is an unknown quantity at this point 
Solved Threads: 6
Geek-Master's Avatar
Geek-Master Geek-Master is offline Offline
Junior Poster

Re: Word 2007 adds extra spaces in mail merge

 
0
  #5
Feb 7th, 2008
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
If in doubt, reach into the trash can and remove the user guide.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 270
Reputation: Michael_Knight is an unknown quantity at this point 
Solved Threads: 12
Michael_Knight's Avatar
Michael_Knight Michael_Knight is offline Offline
Posting Whiz in Training

Re: Word 2007 adds extra spaces in mail merge

 
0
  #6
Feb 7th, 2008
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:
=TRIM(SUBSTITUTE(CONCATENATE(A2, " ", B2, " ", C2), "  ", " "))
hope this helps.
Michael
Forensic IT Consultant / Designer | My DaniWeb Blog
Quis custodiet ipsos custodes?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Windows Software Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC