Share via

Mail Merge with multiple conditional documents - formatting changes when merged

Anonymous
2022-01-18T00:49:37+00:00

I have set up a conditional merge with a main document that has all the 'if then' statements, header & footer. The condition they are looking at is a letter code in my recipient list(CSV format). Each document is linked via a file path. Each document has the correct formatting. All of these documents have correct formatting when used on their own, but when used within the conditional merge, the formatting of the output changes (extra lines or compressed lines, different font sizes etc). It is totally messed up with the conditional merge. BTW there are both English and Chinese characters in the letter templates. Could this be causing the formatting issue? What am I missing here? What else can I try?

Microsoft 365 and Office | Word | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

18 answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2022-03-04T07:14:25+00:00

    This is screen shot the mail merge main document that I set up for CJones2155 who is also a participant in this thread. Each of the colored sections of text were originally included in separate letters

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-02-21T21:23:13+00:00

    Thanks, Anna!

    We also use Raiser's Edge and had to figure out a process to replace their merge wizard. I got my conditional merge to work last week, through a lot of trial and error. What I found was that the letters all had different formatting and different defaults, and they were not linking to my conditional merge. Once I realized that problem, I updated all (60) letters, and then I had to re-input my if..then...else statements. Any time I made an update to my source document, I had to redo the statement, otherwise the new letter would not pull.

    Happy to finally have it working - have one week left to test run it!

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2022-02-21T19:17:00+00:00

    I feel your pain. A little background. I use Blackbaud Raiser's Edge and they recently announced that the interface with Microsoft Word is going away on February 28. My data source is an exported CSV file from Raiser's Edge.

    What I learned is that you need to be VERY methodical in the process.

    1. All the source documents and your Master merge document should be in one folder so that they are easily accessible.
    2. the source documents and conditional merge document all need to be linked to the same data source. I set it up so that when I export my data from Raiser's Edge it always goes to the same place and has the same file name.
    3. File names for letters and data source documents should not contain any other symbols such a periods, apostrophes or dashes.
    4. Remember, the name of your letter in the file path might not be the same name as the letter name in your data source.
    5. Do not attempt to type in file path of the source document in your Master merge document. Always copy and paste. The easy way to do this is to use the folder from your task bar to show all of your source files. To copy the file path, select the document, then hold down your shift key and right click. In the drop-down menu select "copy file path".
    6. Have "View Field Codes" and "Insert Field Codes" available in your quick access toolbar. It makes life easier. To add these, you right click on the quick access toolbar and follow the instructions in the dialogue box. select "View all Commands" so you can see all the options.

    Okay, ready to start the master merge document. This is assuming that you have already linked your source documents to the data source.

    1. Start a new document.
    2. In the mail function in Word, select your data source. Then make sure "View Field Codes" is on.
    3. In the rules section select the If/then/else rule. For Field Name select "letter" For Comparison select "equal to" For the Compare to, type in the name of the letter as it appears in your data source (it must match exactly). You will now see this: { IF { MERGEFIELD Letter } = "Your Letter Name" "" "" }
    4. Place your curser between the first set of empty quotes and select "insert merge field" from your quick access toolbar.
    5. With your curser inside the brackets you just created, right click. Select "Edit Field". A dialogue box will appear.
    6. Select "include text"
    7. A box will appear to insert your file path. Copy the file path of the corresponding letter and paste it in the box. and click Ok/Apply.

    To test this go to mail and select edit letters to see if your document appears as you intended. Once you confirm that you got it right, continue adding your remaining letters in the master document in the same manner. (do not space or return between your if/then/else commands.)

    I hope this helps.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2022-03-24T13:13:09+00:00

    Nikki, you are AWESOME! I used text boxes for my differently formatted text and it worked perfectly. Thank you so much! You are a life saver.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  5. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2022-01-18T01:12:14+00:00

    If you send me a copy of the data source and the documents (mail merge main document and those included by the use of the, I assume, INCLUDETEXT fields), referencing this thread in the covering email message, I will investigate the issue.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments