Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2014, 11:52 AM
robbeh robbeh is offline Mail Merge Formatting Issue with Conditional IFs Windows 7 64bit Mail Merge Formatting Issue with Conditional IFs Office 2010 32bit
Novice
Mail Merge Formatting Issue with Conditional IFs
 
Join Date: Jul 2014
Posts: 4
robbeh is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 07-08-2014, 03:09 AM
macropod's Avatar
macropod macropod is offline Mail Merge Formatting Issue with Conditional IFs Windows 7 32bit Mail Merge Formatting Issue with Conditional IFs Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,468
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

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]
Reply With Quote
  #3  
Old 07-08-2014, 06:41 AM
robbeh robbeh is offline Mail Merge Formatting Issue with Conditional IFs Windows 7 64bit Mail Merge Formatting Issue with Conditional IFs Office 2010 32bit
Novice
Mail Merge Formatting Issue with Conditional IFs
 
Join Date: Jul 2014
Posts: 4
robbeh is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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.
Thank you Macropod for your response. That definitely helped with the extra space above the letters. I thought before it sometimes didn't add that space but so far that just seems to be my imagination.

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
Reply With Quote
  #4  
Old 07-08-2014, 06:45 AM
macropod's Avatar
macropod macropod is offline Mail Merge Formatting Issue with Conditional IFs Windows 7 32bit Mail Merge Formatting Issue with Conditional IFs Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,468
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

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]
Reply With Quote
  #5  
Old 07-08-2014, 06:53 AM
robbeh robbeh is offline Mail Merge Formatting Issue with Conditional IFs Windows 7 64bit Mail Merge Formatting Issue with Conditional IFs Office 2010 32bit
Novice
Mail Merge Formatting Issue with Conditional IFs
 
Join Date: Jul 2014
Posts: 4
robbeh is on a distinguished road
Default

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.
Reply With Quote
  #6  
Old 07-08-2014, 07:39 AM
robbeh robbeh is offline Mail Merge Formatting Issue with Conditional IFs Windows 7 64bit Mail Merge Formatting Issue with Conditional IFs Office 2010 32bit
Novice
Mail Merge Formatting Issue with Conditional IFs
 
Join Date: Jul 2014
Posts: 4
robbeh is on a distinguished road
Smile

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!
Reply With Quote
Reply

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 Formatting Issue with Conditional IFs Mail merge conditional adress blocks. Thrizian Mail Merge 2 07-17-2012 10:41 PM
Mail Merge Formatting Issue with Conditional IFs Conditional merge fields in mail merge Aude Mail Merge 1 01-06-2012 07:38 PM
Mail Merge Formatting Issue with Conditional IFs 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

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 09:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft