![]() |
#5
|
||||
|
||||
![]()
A different way of approaching this issue would be to bookmark the ranges spanning the tables that correspond to each formfield. Then you could use code like:
Code:
Sub Parent() Application.ScreenUpdating = False Dim i As Long With ActiveDocument .Unprotect Select Case .FormFields("Parent1").Result Case "No" With .Bookmarks("BkMk1").Range While .Tables.Count > 0 .Tables(1).Delete Wend End With End Select .Protect wdAllowOnlyFormFields, True End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
braddgood | Word VBA | 15 | 10-02-2015 01:54 PM |
Excel to Word and delete certain tables | jon12355 | Word VBA | 10 | 10-15-2014 03:01 PM |
![]() |
nightkn8 | Word | 2 | 07-02-2014 02:42 AM |
![]() |
James Ayers | Word | 3 | 07-14-2013 07:53 PM |
![]() |
atfresh | Word Tables | 1 | 06-19-2011 09:13 PM |