View Single Post
 
Old 09-14-2012, 03:59 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

I am unable to replicate that error. If you can provide some more info on the table the code falls over on (especially by including a copy of it in a document attached to a post), I might be able to do something.

Here's a minor enhancement to the code in case it encounters a one-row table:
Code:
Sub ExtractTableNotes()
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument
  For i = .Tables.Count To 1 Step -1
    With .Tables(i)
      If .Rows.Count > 1 Then
        .Split .Rows.Count
        .Delete
      End If
    End With
    With .Tables(i)
      .Range.Characters.First.Previous.Delete
      .ConvertToText
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote