![]() |
|
|
|
#1
|
||||
|
||||
|
Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Rng As Range
With ActiveDocument.Tables(1).Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "\[*\]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
If .InRange(ActiveDocument.Tables(1).Range) Then
If .Cells(1).ColumnIndex = 3 Then
.Cut
Set Rng = .Cells(1).Previous.Range
With Rng
.End = .End - 1
If Len(.Text) > 0 Then .InsertAfter Chr(11)
.Collapse wdCollapseEnd
.Paste
End With
End If
.Find.Execute
Else
Exit Do
End If
Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Can I create a single-cell table that moves with the text?
|
lcaretto | Word Tables | 7 | 11-01-2013 06:04 AM |
| Enter text into next available cell in a table | molesy | Word VBA | 2 | 09-11-2013 02:25 AM |
Text Form Fields - Filling the table cell
|
simville02 | Word Tables | 1 | 01-31-2013 11:12 PM |
| Text Wrapping on Fixed Lines in a Form field/Table cell | okrmjr | Word Tables | 0 | 10-30-2009 08:52 AM |
| Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |