Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Mail Merge

Status
Not open for further replies.

jcarmody

Programmer
Apr 25, 2002
39
US
Hello -

I have an extract from the mainframe that I am using for a Word mail merge. I would like to convert the name field from all capital letters to proper case. I would also like to eliminate extra spaces between the first and last name. Is there a way I can do this in Word? Maybe with a Macro?

 





Hi,

"I have an extract from the mainframe..."

How is this file generated?

Easiest to change the data here by replacing 2 spaces with one spce iteratively.

Proper Case can be done in Word Mail Merge.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi jcarmody,

Changing case within a merge field is a simple matter of adding the appropriate field switches (see Word's Help file and post back if you run into difficulties).

However, Word's field code abilities don't extend to string maniplulation. So, if there are extra spaces in the source data you'll need to remove them there. If, however, you just want to suppress unwanted extra spaces in the text when a mergefield is empty, field coding can be used for this. Again, post back if that's what you're after.

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top