Dear all,
I want to perform a mail merge like this.
I have an Excel file with personal information of customers and want to
export it as Word documents and print it. One of the items to be exported is
called "Account_Number" (A string with 10 characters) . However, I only want
the first 5 characters to be shown on the document. What can I do to the
mergefield? Can I use some sort of functions like Left(Account_Number, 5) as
in Excel? I don't want to modify the Excel file if possible. Thanks in
advance!
Best Regards,
Andy
Doug Robbins - Word MVP - 14 Jan 2006 10:47 GMT
Use the Left() function in Excel to create another column containing just
that information.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Dear all,
>
[quoted text clipped - 10 lines]
> Best Regards,
> Andy
Graham Mayor - 14 Jan 2006 13:32 GMT
You can't use string operators in fields. Despite your reluctance to edit
the Excel data source, as Doug says, that is the best course; however if the
field is a number (as opposed to numbers and letters) then
{ =INT({ Mergefield Account_Number} /100000) } should do the trick.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Dear all,
>
[quoted text clipped - 10 lines]
> Best Regards,
> Andy