![]() |
#1
|
|||
|
|||
![]() I am using the follwoing with mail merge directory. «Patient_Name» CHART # «Patient_» DOB: «DOB» cc: «Primary_Care_Physician» WCB (7) Insurance: «Ins_Plan» «Employer» «Injury_Date» «No_Fault» If cc, WCB, Employer, Injury Date, No Fault are empty in excel (not all have this but some do), I get a lot of extra blank lines before the next entry. How can I fix this? Thank you |
#2
|
||||
|
||||
![]()
You can suppress the empty lines using the mergefield \b or \f switches. First turn on Word's formatting display so you can see the ↵ & ¶ symbols that represent line & paragraph breaks. To conditionally suppress, the «Employer» field for example:
• select the field and press Shift-F9 to expose the field code. You should see {MERGERFIELD Employer}¶ • Edit the field code so you get {MERGERFIELD Employer \f "¶ "} Note that the paragraph break is now inside the field and the «Injury_Date» field is now immediately after the "} Similarly, to suppress the 'WCB (7) Insurance: «Ins_Plan»' line: • select the field and press Shift-F9 to expose the field code. You should see «Ins_Plan» • Edit the field code so you get {MERGERFIELD Ins_Plan \b "WCB (7) Insurance: " \f "¶ "} Note that the 'WCB (7) Insurance: ' text and the paragraph break are now both inside the field.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Thank you. I tried to do what you said but can't seem to get it working. I will attach my file here. I already has some formatting inside the brackets and maybe that is why I'm struggling.
|
#4
|
||||
|
||||
![]()
I see you have implemented the \b switches, but you haven't implemented the \f switches...
As for the prefix text, if you don't want the \* Caps switch to apply to that, you'd need to use a nested field construction like: {IF{ MERGEFIELD "Employer" } <> "" "Employer name: { MERGEFIELD "Employer" \* Caps}¶ "}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
Thank you for your help. I think this is above my ability at the present time.
|
#6
|
||||
|
||||
![]()
It's really not that difficult. See attached.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Autofit adding extra lines | John_G | Excel | 0 | 11-20-2012 08:19 AM |
![]() |
ramsgarla | Word VBA | 1 | 10-29-2012 12:26 AM |
![]() |
Welshie82 | Mail Merge | 2 | 11-14-2011 01:41 AM |
![]() |
lucadelcarlo | Word | 1 | 04-23-2011 04:05 PM |
![]() |
sieler | Word | 3 | 04-12-2009 01:38 PM |