View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Truncating in Mail Merge

Unfortunately there is no RIGHT function associated with Word fields. If the
field contains a number (rather than numbers and letters) then you could
cobble something together along the lines of

{ SET AB { =({ Mergefield fieldname } / 10000 ) \# "0.0000"} } ***{ =({
AB } - { =INT({ AB }) }) * 10000 }

with the number of asterisks representing the missing leading numbers, but
if it is not a simple number, you will have to edit the data file.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Laurel wrote:
Hi All,
I'd like to print just the last 4 numbers of an account number in a
mail merge letter (front fill the rest with asterisks). It seems like
it should be just as simple as the RIGHT function in Excel but by
necessity my source document has be a CSV text document so the
function has to take place in Word. Is this possible?

Thanks so much!
Laurel