View Single Post
 
Old 04-11-2011, 05:38 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Steven,

Quote:
I cannot control the source of my packet information, I just have to edit each one manually.
If you're getting a plain text file, it probably wouldn't take too much work to run it through a series of Find/Replace operations in Word to clean it up and maybe add some more field delimiters before using it for the mailmerge. That way, you could get rid of any unwanted spaces and, if you want, have separate fields for the locality, state & zip, so that each can be formatted and positioned however you want them and independently of each other. If the data are consistent enough, the process could be encoded in a macro that does everything from opening the data file, cleaning it up, saving the updates, then executing the mailmerge. The whole process could be almost as quick as doing the mailmerge now after you've cleaned the data.

Re:
Quote:
how can I drop anything after a space " " in a merge field
If the field contains only numbers, that's easy enough to do via a formual field coded along the lines of:
{={MERGEFIELD SomeField} \# 0}
That will even strip leading 0s - or you can add extra 0s to the one in the field to preserve them. Coding the field as:
{={MERGEFIELD SomeField} \# "$,0"}
will even format it as currency with thousands separators.

However, there is no practical way for trimming for text with field coding, so you can't turn "BLAH 1234" into "BLAH". Pre-processing in Word would enable you to place the strings into separate fields, though.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote