#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
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] |
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 |
VBA Picture Positioning | cole10 | PowerPoint | 4 | 09-20-2012 06:55 AM |
How to force tabs to be consistent | PatrickYork | Word | 1 | 05-01-2012 07:21 AM |
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 |