Lettermerge problem

P

Per H. Jensen

I am using Word 2003 and a CSV data source to create a mailmerge. Amongst the
data elements is a field that contains an element in the format
12345678-9878. This item has to merged into 2 different fields, where the
first merge field has to show the first 8 numbers before the "-" and the
second merge field has to show the last 4 numbers after the "-". Is this
feasible, and if so how. I have checked the online help and simply cant find
anything that helps me do this.

Changing the original CSV file content is NOT an option.

Thanks in advance.
 
D

Doug Robbins

I think that you have a couple of choices. One would be to open the CSV
file in Excel and use a formula to split the element into two, then use the
Excel file as the data source.

Another would be to use a Catalog or Directory type mailmerge to create a
Word document containing the data and then use a macro to do the splitting

Or, execute the merge from the CSV file with a placeholder for one part of
the data and then run a macro over the document to split the element and
replace the placeholder with the relevant part of the data.

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top