#1
|
|||
|
|||
Line spacing after mail merge
Hey guys,
Have, what I think is, a strange problem. We are trying to do our wedding invites off a mail merge with a line spacing before and after the invitee of 1.5 To solve all the cases of the different types of people we invite (Singles, married couples and couples with different last name to each other) I have created the following field code (apologies for the entirely random field names) Code:
{MERGEFIELD firstname \f " "} {MERGEFIELD optional1 \f " "} {IF {MERGEFIELD firstname1} <> "" "&<CR>" "} {MERGEFIELD firstname1 \f " "} {MERGEFIELD optional2} firstname - first name of first guest optional1 - last name of first guest if different to last name of second guest firstname1 - first name of second guest, if exists optional2 - last name of second guest or last name of married couple After applying the mail merge everything works great except for the case of a Single guest. The line spacing (of 1.5) disappears. If I select that line and change it back to a line spacing of 1.0 then hover over the 1.5 option it displays the line spacing correctly but when I click on the option it reverts back, on the screen, to a line spacing of 1.0 even though the line spacing dialogue box says it is set to 1.5. I had a work around of setting the False section of the IF statement to <CR> but this is a bit of a hack and does not give the correct spacing. Any ideas? Thanks |
#2
|
||||
|
||||
A generalised construction would be:
{MERGEFIELD First_Name} {IF{MERGEFIELD Spouse_First_Name}= "" {MERGEFIELD Last_Name} {IF{MERGEFIELD Spouse_Last_Name}= {MERGEFIELD Last_Name} "and {MERGEFIELD Spouse_First_Name} {MERGEFIELD Last_Name}" {IF{MERGEFIELD Spouse_Last_Name}= "" "and {MERGEFIELD Spouse_First_Name} {MERGEFIELD Last_Name}" "{MERGEFIELD Last_Name} and {MERGEFIELD Spouse_First_Name} {MERGEFIELD Spouse_Last_Name}"}}} Note: You need to have all of the spaces indicated in the field code. For a macro to convert field text strings like the above to working field codes, see: http://www.gmayor.com/export_field.htm#TextToField In your case, you could substitute 'firstname' for 'First_Name' and 'firstname1' for 'Spouse_First_Name', but I'm not sure what 'optional1' and 'optional2' represent, so I can't comment on what you want there or whether they should be substituted for 'Last_Name' and 'Spouse_Last_Name'. As for the paragraph break, you should be able to insert one after each 'and' in the field code and format those and the paragraph break following the field with the attributes you require.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you very much for that,
It works perfectly Much appreciated |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What does 1.5 line spacing mean? | Ugeen | Word | 7 | 11-24-2013 04:25 PM |
Double Line Spacing in Word 2010 address merge | Chevydean | Word | 1 | 09-15-2013 11:51 AM |
line spacing ? | strato | Word | 1 | 02-20-2012 05:48 AM |
Mail merge line break | camlad | Mail Merge | 3 | 06-29-2011 05:01 PM |
email as pdf attachment - subject line and attachment named after mail merge | Nexus | Mail Merge | 12 | 04-13-2011 11:34 PM |