Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
merge multiple documents with different margins
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 |
#2
|
|||
|
|||
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 My web site www.gmayor.com Word MVP web site http://word.mvps.org jka319 wrote: 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 |
#3
|
|||
|
|||
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 "jka319" wrote in message ... 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 |
#4
|
|||
|
|||
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 "jka319" wrote in message ... 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 |
#5
|
|||
|
|||
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. |
#6
|
|||
|
|||
Hi ?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 :-) |
#7
|
|||
|
|||
Actually, it can be done, as far as APPEARANCE goes, by setting the
Indent, as Peter suggested. Graham, I think! Peter Jamieson "Cindy M -WordMVP-" wrote in message news:VA.0000b19b.00631d79@speedy... Hi ?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 :-) |
#8
|
|||
|
|||
ooops!
Actually, it can be done, as far as APPEARANCE goes, by setting the Indent, as Peter suggested. Graham, I think! Cindy Meister |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combining multiple merge documents | Mailmerge | |||
Merge from a .txt file to multiple Word documents | Mailmerge | |||
Mail merge multiple documents? | Mailmerge | |||
How do I merge multiple Word documents into a single one on DOS? | Microsoft Word Help | |||
Merge multiple documents? | New Users |