View Single Post
 
Old 09-17-2012, 09:00 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Working with merged cells does make it difficult to process tables on a row-by-row basis. Try the following macro, which assumes the desired content is always in the table's last cell:
Code:
Sub ExtractTableNotes()
Application.ScreenUpdating = False
Dim i As Long, Rng As Range
With ActiveDocument
  For i = .Tables.Count To 1 Step -1
    Set Rng = .Tables(i).Range.Cells(.Tables(i).Range.Cells.Count).Range
    Rng.End = Rng.End - 1
    Rng.InsertAfter vbCr
    Rng.Copy
    Set Rng = .Tables(i).Range
    Rng.Tables(1).Delete
    Rng.Paste
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote