Computing.Net > Forums > Office Software > Spaces between merge fields in Word

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Spaces between merge fields in Word

Reply to Message Icon

Name: Max Sloman
Date: November 11, 2004 at 06:23:33 Pacific
OS: Windows NT
CPU/Ram: Irrelevant
Comment:

Hi.

Does anyone know how to suppress a space appearing before a field if the field appearing before it is empty?

My situation is this: I have a large Excel spreadsheet with names and addresses, etc. Unfortunately, the person who compiled much of the data source had a habit of putting the whole name ("John Smith") into the surname column, and nothing at all in the first-name column. To make matters worse, she didn't follow this practice consistently, so that some entries do have both cells filled. Consequently, when I do a mailmerge with "<<First_Name>> <<Last_Name>>", in the cases where the whole name was in the second of the two fields, I get a blank field, followed by a SPACE, followed by the name - in effect, a space and then the name. So what I want to know is, can I give Word (2003) an instruction to suppress a space following a field if that field is empty?

Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: rayok
Date: November 11, 2004 at 12:48:04 Pacific
Reply:

Crikey ! ok how does this sound, if you delete the spaces between the <<field names>> can you put them in using the insert word field > if....then....else !!

Something along the lines of if field name is not blank then insert " "

So if the field is occupied it will insert a space (and will be correctly formatted) if the first field is blank then an extra space is not inserted

Techy n Welsh


0

Response Number 2
Name: Max Sloman
Date: November 12, 2004 at 05:10:43 Pacific
Reply:

Thanks for that - it's potentially very helpful. Now, does anyone know the extact syntax I should type into the box after the "IF" command, in order to achieve this.... ?


0

Response Number 3
Name: mdow
Date: November 12, 2004 at 07:22:56 Pacific
Reply:

I would just fix the problem all together. Firt make a backup copy of your original spreadsheet. Then make a temp copy of the spreadsheet.

Sort your temp spreadsheet and your original so that the names that appear in one field are grouped together.

Delete all the records where the full name is in one field from your original. Then delete all other records from the temp.
Save the temp file as space delimited. Then import the name into the apporpriate fields in the original using the space delimiter.


0

Response Number 4
Name: Knippen
Date: December 23, 2004 at 10:28:22 Pacific
Reply:

The answer is given here:

http://totaltutorials.com/Tutorials/Go.asp?ID=2250

Scroll down for the second item: 'Suppressing unwanted spaces and commas within a line of an address', all for mailmerge use.



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


autoreply in Outlook Office XP and Office 97



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Spaces between merge fields in Word

Date Field in Word www.computing.net/answers/office/date-field-in-word/6037.html

Problem when merging from excel to word www.computing.net/answers/office/problem-when-merging-from-excel-to-word/8618.html

How to double space in word perf 12 www.computing.net/answers/office/how-to-double-space-in-word-perf-12/5867.html