Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-11-2011, 05:38 AM
macropod's Avatar
macropod macropod is offline Adding a DASH in the middle of my field Windows 7 32bit Adding a DASH in the middle of my field Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,514
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to refer a field in another field DaveSmith Word 0 08-24-2010 06:44 PM
Dash in the beginning of a new line Wakinyan Word 0 07-11-2010 07:10 AM
Page break middle of table (word 2003) mujisan Word Tables 1 06-18-2010 12:05 AM
Adding a field to a folder of PDF files. Balliol Windows 0 11-22-2009 02:02 PM
Hyphen vs. en-dash tocuin Word 0 09-18-2009 10:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft