![]() |
#2
|
||||
|
||||
![]()
What you could do, without the need for a separate column in your table, is use the mergefield \f switch to output the ')' for each populated line. That wouldn't help with lines that wrap, though, and there's no way for a mailmerge to generate the ')' in such cases. The alternative would be to use a macro to populate the column with ')' characters post-merge. The following macro will both execute the merge and update the output document post-merge.
Code:
Sub MailMergeToDoc() Dim Sctn As Section, sngHght As Single ActiveDocument.MailMerge.Execute For Each Sctn In ActiveDocument.Sections With Sctn.Range.Tables(1) sngHght = .Cell(1, 1).Range.Characters.Last.Previous.Information(wdVerticalPositionRelativeToPage) With .Cell(1, 2).Range .Text = "))))" Do While .Characters.Last.Previous.Information(wdVerticalPositionRelativeToPage) < sngHght .Characters.Last.InsertBefore ")" Loop End With End With Next End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
legal pleadings |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
carlos_cs | Excel | 3 | 05-04-2016 08:44 AM |
Auto add a right paren at end of line | dlowrey | Word | 2 | 10-07-2014 07:10 AM |
Combining two pieces of VBA to create caption field above table | lsmcal1984 | Word VBA | 1 | 08-16-2013 04:12 AM |
![]() |
MrRikkie | Word VBA | 1 | 10-12-2012 09:15 AM |
Add automatic separator in caption "Figure 1: __" | poobear | Word | 1 | 05-12-2011 04:05 PM |