merge multiple documents with different margins

J

jka319

I have a data file where each record needs to be merged with one of several
different form letters. The letter it should be merged with depends on a
certain field in the data file (in this case, the User_Field_2). I've
accomplished this by using a main letter that is just a series of "if"
statements with "includetext".

Here's one of my "if" statements:
{IF {MERGEFIELD User_Field_2} = "BOSSIER" "{INCLUDETEXT
"C:\\MailMerge\\Bossier Parish DA.RTF"}"}

I have several of these "if" statements, one after the other, for each
possible value of User_Field_2.

When I merge the main letter to a new document, it creates a big document
with the correct letters for each record. Here's the problem: Each of these
letters has a specific format that it needs to follow, and they all have
different margins. When I merge them all together, they all take on one set
of margins, which messes up the formatting in some of them.

I've tried setting the margins for each individual "if" statment, but that
creates section breaks between them, which creates 2 other problems: 1. It
puts a blank page between each letter. 2. It leaves a lot of blank lines at
the top of some letters (the ones where the "if" statement was farther down
the page).

Does anyone know of a way to merge different letters into one document, and
still keep the margins of each individual letter?

Any help will be appreciated.
Jennifer
 
G

Graham Mayor

I can't see any simple way to do this, other than to suggest that you format
each letter with individual and unique paragraph styles that reflect the
required formatting. As for the spacing for the later IF constructions,
ensure that there are no line breaks between the fields ie put them all on
the same line. Depending on how you have named the letters, you may find a
simpler constructiuon works better - from the example you have given:

{INCLUDETEXT "C:\\MailMerge\\{MERGEFIELD User_Field_2} Parish DA.RTF"}

would work - but clearly the rest of the documents must begin with the word
you gather from the user_field_2 and the rest of the document names must
contain common text - it would even be worth renaming the documents to match
the fieldname for the sake of simplicity.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Peter Jamieson

The real problem with trying to merge letters with different layouts in the
same merge is that you cannot remove the final paragraph marker in a
document, and the formatting for that document/section is actually
associated with that paragraph marker (bizarre as it may sound, that's how
Word works). If you manage to get this to work, well done (and please let us
know what worked)! But personally, I would try to simplify the whole thing
by breaking it down into several separate merges, each for a different
layout, and each of which only processes its own data. If the merge is going
to be run repeatedly, with any luck a small amount of VBA would be enough to
open each mail merge main document in turn and perform the merge.

Peter Jamieson
 
D

Dale Ramsey

I am also looking for a way to do this. I have a DOS based program (yes I
am still using DOS) that the merge document has 30 or more IF commands and
then depending on criteria required it can open another document that has
anywhere from two or up to twelve more IF commands built into them. I would
welcome Word to be able to accomplish the same task and not have to manually
run multiple queries to get the same result. Please let me know if you find
an answer to this.

Thanks
Dale
 
J

jka319

I finally opened a call with Microsoft, and they eventually told me that it
can't be done. Their solution was to fix all the margins in my documents to
the same margins.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?amthMzE5?=,
I finally opened a call with Microsoft, and they eventually told me that it
can't be done. Their solution was to fix all the margins in my documents to
the same margins.
Actually, it can be done, as far as APPEARANCE goes, by setting the Indent, as
Peter suggested.

Open each document that contains the content for the IncludeText field. Create
a new style in each document (a different name for each document). In that
style, set the INDENT for the paragraph format to the "margin" you want to see.
That will make it appear as if the margins were different. Be sure to apply the
style to all the paragraphs.

<<When I merge the main letter to a new document, it creates a big document
with the correct letters for each record. Here's the problem: Each of these
letters has a specific format that it needs to follow, and they all have
different margins. When I merge them all together, they all take on one set
of margins, which messes up the formatting in some of them.>>

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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