Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2013, 10:14 AM
HangMan HangMan is offline Consistent Text Positioning when Using 'Fields' Windows 7 64bit Consistent Text Positioning when Using 'Fields' Office 2007
Novice
Consistent Text Positioning when Using 'Fields'
 
Join Date: Dec 2013
Posts: 5
HangMan is on a distinguished road
Default Consistent Text Positioning when Using 'Fields'

I am using an 'InsertText' field in conjunction with and 'If' statement as part of a Word MailMerge document. This is to allow me to use more than one source letter to mailmerge my data to, based on criteria within my Excel Spreadsheet.

The problem I have is that because my 'Code' runs on to four lines (the actual file path names are longer than shown here) this results in the text for Letter 2 (Dear...) starting two lines lower than the text for Letter 1.

Is there any way to prevent this from happeneing. I've looked at inserting a 'Section Break', but that makes no difference.

My code looks like this (was unsure if this needs to sit in code tags)?



{ IF { MERGEFIELD Code } = IL { INCLUDETEXT "C:\\My Documents\\My Folder\\Letter1.docx" \* MERGEFORMAT }{ IF { MERGEFIELD Code } = CL { INCLUDETEXT "C:\\My Documents\\\\My Folder\\Letter2.docx" \* MERGEFORMAT }

Many thanks
Reply With Quote
  #2  
Old 12-10-2013, 06:43 PM
macropod's Avatar
macropod macropod is offline Consistent Text Positioning when Using 'Fields' Windows 7 32bit Consistent Text Positioning when Using 'Fields' Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

hi Hangman,

The length of your mergefields & includetext fields has no bearing on the way the mailmerge output appears.

Furthermore, you can control variations in spacing as a result of the includetext field content by putting them inside a table cell with a fixed height. That way, whatever follows the table cell will always start at the same position on the page.

Finally, based on what you've posted so far, I believe you could use something along the lines of:
{QUOTE{INCLUDETEXT "C:\\My Documents\\My Folder\\Letter{IF{MERGEFIELD Code}= IL 1 {IF{MERGEFIELD Code}= CL 2 {IF{MERGEFIELD Code}= XX 3 {IF{MERGEFIELD Code}= ZZ 4 0}}}}.docx"}
Note the field nesting, which simplifies the overall field coding. With this construction, there must always be a file for the includetext field to reference, even if its empty.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Space between number and heading - how to make it consistent for larger numbers Dr Wu Word 4 05-09-2013 08:29 AM
Consistent Text Positioning when Using 'Fields' VBA Picture Positioning cole10 PowerPoint 4 09-20-2012 06:55 AM
Consistent Text Positioning when Using 'Fields' How to force tabs to be consistent PatrickYork Word 1 05-01-2012 07:21 AM
Consistent Text Positioning when Using 'Fields' Positioning Slide Titles genericusername PowerPoint 3 03-17-2011 05:43 AM
Form submenu not consistent! talkinglens Word 5 12-18-2010 02:31 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:04 AM.


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