how to reformat merge field data in form

T

Teresa

I am tiring to reformat a merge field with line breaks. I created a form in which a comma-delimited file is merged with the form. The one field in the data source (input file) could contain many items, which I want to create a new line.
Example an order for one person with many items, I want one letter to be produced and all the items displayed in the one area. The file will have all the items in this one field (delimited by a special character), and I want to be able to create a line break on the special character
Any help would be greatly appreciated!
Thanks,
T
 
P

Peter Jamieson

If possible, you should "fix" this problem by using a completely different
approach to storing and reporting your data. e.g., use Access, design the
data accordingly, and use Access reporting.

If you have to start with the data file you have, there is no simple
general-purpose way within Word to break up the data in a merge field during
a merge. There are no merge field "switches" that will replace one character
by another. So you either have to
a. make the changes in the data source or
b. use a method of getting the data that can substitute one character for
another . This is not always possible and usually difficult even when it is
possible. Or
c. if you are using Word 2002 or later, use VBA and Mail merge events to
reformat the data and stuff it in the document, or
d. do the merge to an output document and use Word Edit|Find/Replace to do
the substitutions you need.
e. use VBA to avoid mail merge altogether.

and personally, I wouldn't really want to do any of those unless (d) was
feasible and very simple.
--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

Teresa said:
I am tiring to reformat a merge field with line breaks. I created a form
in which a comma-delimited file is merged with the form. The one field in
the data source (input file) could contain many items, which I want to
create a new line.
Example an order for one person with many items, I want one letter to be
produced and all the items displayed in the one area. The file will have
all the items in this one field (delimited by a special character), and I
want to be able to create a line break on the special character
 

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