![]() |
|
|
|
#1
|
||||
|
||||
|
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] |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to delete all empty rows from all tables
|
braddgood | Word VBA | 15 | 10-02-2015 01:54 PM |
Macro to conditionally delete rows
|
Steve_D | Excel | 2 | 08-24-2012 09:37 PM |
Macro to delete rows with all empty cells
|
ubns | Excel Programming | 2 | 08-14-2012 02:01 AM |
merging rows and creating sub-rows
|
gib65 | Excel | 2 | 12-09-2011 02:09 PM |
| delete email message via blackberry and have it delete on my pop3 and my outlook | Iamthestorm | Outlook | 2 | 10-28-2010 12:21 AM |