![]() |
|
#2
|
||||
|
||||
|
For example:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Rng As Range
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "AAA"
.Replacement.Text = ""
.Format = False
.Forward = False
.Wrap = wdFindStop
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
End With
Do While .Find.Execute
If .Information(wdWithInTable) = True Then
Set Rng = ActiveDocument.Range(0, .Tables(1).Range.Start)
Do While Rng.Tables.Count > 0
Rng.Tables(1).Delete
Loop
Exit Do
End If
.Collapse wdCollapseStart
Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| table deletions |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Track Changes Problem - lines from comments & deletions don't go to right text.
|
Emmryss | Word | 6 | 01-17-2019 05:37 PM |
| VBA to provide text string with specific formating based on Drop down list (content control) | MP1989 | Word VBA | 4 | 07-30-2018 02:40 AM |
Stop Show Up Formatting and Insertions&Deletions
|
theta30 | Word | 6 | 03-20-2014 03:57 PM |
| Macro to format additions deletions when Comparing Files | Alphacsulb | Word VBA | 0 | 08-19-2013 03:03 PM |
| inserting a string of data into an MS Word table??? | matto | Word VBA | 0 | 07-16-2010 09:35 AM |