#1
|
|||
|
|||
Mail Merge Formatting Issue with Conditional IFs
I am working with an old document (.doc) using a bunch of conditional IFs to create letters for a list of people.
The letters template fills out their address, name etc no problem. The issue is for the body we are using an INCLUDETEXT field to select which letter to include. These letters are already written and formatted in another document. The issue: When we run the mail merge, sometimes an extra space is added to each letter between then Name and Content. The letter template does not how an extra space (or paragraph tag) and neither does the Mail Merge document. This space is created out of thin air! On top of that sometimes a single line will be bold. The default letter template that is imported using IMCLUDETEXT has no bold what so ever and neither does the Mail Merge document. IT looks something like this: {IF { MERGEFIELD } = "hockey" "{ INCLUDETEXT "C:\\FILEPTHHERE\\preset-document.doc" \*MERGEFORMAT}" ""} There is about 50 IF statements. Everything works fine but the formatting of the imported letter. Any ideas? Thanks, Robb |
#2
|
||||
|
||||
Basically, the issue is that, when you use an INCLUDETEXT field this way, it inserts the final paragraph break from the source document. If the field is in its own paragraph, that means you'll get both that paragraph's break and the one from the inserted document. The simplest solution is to not have a paragraph break after the INCLUDETEXT field (i.e. add the field to the start of whatever paragraph follows it).
PS: You can probably do without the \* MERGEFORMAT switch, too.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Quote:
My last question is the \* MERGEFORMAT...so the reason the document uses it is because: 1) The margins are all over the place in the Mail Merge source document. The MERGEFORMAT switch seems to resolve that. Not a huge issue since I can adjust all the margins. 2) The bigger issue is, without the MERGEFORMAT the imported document comes in at 12pt font Times New Roman, even though the source document is not in that font. Word defualt font is something totally different too. So I had to use the MERGEFORMAT to make sure it was 11pt Cambodi. Any idea why it includes in a different font? Thanks a ton, Robb |
#4
|
||||
|
||||
Both issues suggest the document referenced by the INCLUDETEXT field has some inconsistent formatting: Section breaks that apply page layouts differing from the mailmerge main document and Styles that have been overridden by hard formatting. The consistent use of page layouts and Style definitions in both documents would resolve such issues.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
That has to be spot on. The document is years old and definitely has had many cooks in the kitchen on this one with plenty of different formatting.
It references over 50 files. I will see if I can somehow strip the formatting or ultimately rebuild the source document. Thank you for your help, knowing the "why" to a few of these questions really helps me understand what is going on. Hopefully I come back with some good news. |
#6
|
|||
|
|||
Resolved!
For those that are having this issue it was a combination of things. Macropod was spot on that I didn't need MERGEFORMAT (I also used to have CHARFORMAT but that made no sense so I removed it). THe reason I used MERGEFORMAT was because the font of the INCLUDETEXT was always Times New Roman 12pt. What I realized was the default font of the document was Times New Roman 12pt (originally thought it wasn't). Maybe I am wrong but somehow when the letters (documents to be imported) are created, they are created using the default font for the user and somehow Word takes note of this. When imported, it uses the "default font" of the document. I say this because if I change the font to something that's not my default on those letters, it works great and is imported with the new font. As soon as I change the letter back to my default font, the mail merge doc uses the document defualt font. Hopefully that made some sense. Thanks a ton for your help! Great forum, I will definitely hang around to help out and learn more! |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conditional Mail Merge per Student and Quarter | marysilvaramos | Mail Merge | 1 | 01-29-2013 07:17 PM |
Mail merge conditional adress blocks. | Thrizian | Mail Merge | 2 | 07-17-2012 10:41 PM |
Conditional merge fields in mail merge | Aude | Mail Merge | 1 | 01-06-2012 07:38 PM |
Office 2007 Mail Merge Issue - automatic formatting and revisions balloons | sharpie21 | Office | 1 | 10-10-2010 03:56 AM |
Word 2007 mail merge issue | steelervince | Mail Merge | 0 | 02-17-2010 02:26 PM |