![]() |
#5
|
||||
|
||||
![]() Quote:
Code:
Sub Removetables() Dim oTable As Table Dim i As Integer i = 1 For Each oTable In ActiveDocument.Tables If i Mod 2 = 1 Then oTable.Delete i = i + 1 Next oTable End Sub If you want to remove table 2, table 4, table 6 etc then change Code:
If i Mod 2 = 1 Then oTable.Delete Code:
If i Mod 2 = 0 Then oTable.Delete
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
help please, tables, word vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
OceansBlue | Word | 2 | 04-03-2013 10:01 AM |
![]() |
pwangdel | Word | 3 | 11-03-2011 06:10 AM |
![]() |
Phelony | Word | 1 | 10-18-2011 03:28 AM |
background graphic removal | taffyevo | PowerPoint | 0 | 08-16-2011 06:36 AM |
![]() |
Buckeyegator | Office | 1 | 03-25-2010 09:15 PM |