The correct code is:
Sub Removetables ()
Dim oTable As Table
[b]For[/b] Each oTable In ActiveDocument.Tables
- To post as a guest, your comment is unpublished.· 4 years agoThank you @anon
Kutools for Excel is a powerful add-in that frees you from performing time-consuming operations in Excel, such as combine sheets quickly, merge cells without losing data, paste to only visible cells, count cells by color and so on. 300+ powerful features / functions for Excel 2019, 2016, 2013, 2010, 2007 or Office 365!
It enables tabbed browsing, editing, and managing of Microsoft Office applications. You can open multiple documents / files in a single tabbed window, such as using the browser IE 8/9/10, Firefox, and Google Chrome. It's compatible with Office 2019, 2016, 2013, 2010, 2007, 2003 or Office 365. Demo
Kutools for Outlook is a powerful add-in that frees you from time-consuming operations which majority of Outlook users has to perform daily! It can save your time from using Microsoft Outlook 2019, 2016, 2013, 2010 or Office 365!
Kutools for Word is a powerful add-in that frees you from time-consuming operations which majority of Word users have to perform daily! It can save your time from using Microsoft Word / Office 2019, 2016, 2013, 2010, 2007, 2003 or Office 365!
Restores the old look and menus of Office 2003 to Microsoft Office 2019, 2016, 2013, 2010, 2007 or Office 365. Don’t lose time in finding commands on the new Ribbon. Easy to deploy to all computers in enterprises and organizations.
Remove all tables in Word is usually applied in daily office working, and how can you quickly remove all tables? This tutorial will introduce three simple ways for you to remove all tables.
Generally speaking, it's easy to remove a table in Word. However, it will time-consuming and tedious to remove multiple tables one by one manually. Here, with the Remove Tables feature of Kutools for Word, you can easily remove all tables from a certain selection or the entire Word document with only one click! Click for 60-day free trial!
Actually, you can remove a table manually in Word. Please do as follow:
In the Word, put cursor into the specified table to activate it, next click the cross at the top-left corer of the table to select the whole table, and then select Delete > Delete Table to remove it. See screenshot:
Note: You can also put the cursor into the specified table to activate it, and then click Layout > Delete > Delete Table to remove this table. See screenshot:
It will be time-consuming to remove multiple tables one by one manually with above method. Here, this method will introduce a VBA to batch remove all table from the current Word document at once. Please do as follows:
1: Press Alt+F11 to open the Microsoft Visual Basic for Applications window;
2: Click Insert > Module, and paste below VBA code into the Module window;
VBA: Remove all tables from the current Word document
Sub Removetables () Dim oTable As Table For Each oTable In ActiveDocument.Tables oTable.Delete Next oTable End Sub
3: Click Run button or press F5 key to apply the VBA.
Some users may not be familiar with VBA code. Take it easy! Kutools for Word's Remove Tables utility will help you remove all tables from a certain selection or the whole document at once with only one click!
Just click Kutools > Remove > Remove Tables, and all tables will be removed from the current Word document immediately.
Note: If you want to remove all tables from a certain selection, please select the part of document firstly, and then click Kutools > Remove > Remove Tables.