Note: The other languages of the website are Google-translated. Back to English

How to Select All Tables in Word document?

It is easy to select a table in Word by clicking the dot-select-table-symbol button on the upper left corner of the table as below screenshot shown. You can also select a table with the Select Table feature. However, is there any way to quickly select all tables at once in Word document? The methods in this article will help you to get through it. 


Select all tables in Word with VBA code

Easily select all tables in Word with Kutools for Word


Select all tables in Word with VBA code

1. Press Alt + F11 keys to open the Microsoft Visual Basic for Application window.

2. In the opening Microsoft Visual Basic for Applications window, click Insert > Module, Then copy and paste the following VBA code into the Module window;

VBA code: Select all tables in current document:

Sub selecttables()
Dim mytable As Table

For Each mytable In ActiveDocument.Tables
mytable.Range.Editors.Add wdEditorEveryone
Next
ActiveDocument.SelectAllEditableRanges (wdEditorEveryone)
ActiveDocument.DeleteAllEditableRanges (wdEditorEveryone)
End Sub

3. Press the F5 key to run the code

Then all tables are selected in current document immediately.


Easily select all tables in Word with Kutools for Word

Comparing with using a VBA code to select all tables in a document, Kutools for Word’s Select Tables utility is quite handy. You can use this feature to select tables in a selection or the whole document. Please do as follows:

Kutools for Word : With more than 100 handy Word add-ins, free to try with no limitation in 60 days.

Click Kutools > Tables > Select Tables. See screenshot:

Note: For selecting tables in selection, you need to select the range firstly and then apply the feature.

Then you can see the results as follows.

Select tables in selection:

Select tables in the whole document:

If you want to have a free trial of this utility, please go to free download the software first, and then go to apply the operation according above steps.


Demo: Easily select all tables in Word with Kutools for Word



Recommended Word Productivity Tools

 

Kutools For Word - More Than 100 Advanced Features For Word, Save Your 50% Time

  • Complicated and repeated operations can be done one-time processing in seconds.
  • Insert multiple images across folders into Word document at once.
  • Merge and combine multiple Word files across folders into one with your desired order.
  • Split the current document into separate documents according to heading, section break or other criteria.
  • Convert files between Doc and Docx, Docx and PDF, collection of tools for common conversions and selection, and so on...
Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
thank you so much he is good program but after few days stopped and require password and user name
This comment was minimized by the moderator on the site
excellent macro and very easy
This comment was minimized by the moderator on the site
Nifty code at first but it definitely corrupted a bunch of tables in Word 2010. Screwed up my file pretty good and had to revert back to an earlier version. Be wary!
This comment was minimized by the moderator on the site
Wonderful I got the solution by using the VBA code. Thank you so much
This comment was minimized by the moderator on the site
The following modified code selects all tables, except tables having only one row: Sub SelAllTbls() ActiveDocument.DeleteAllEditableRanges (-1) Dim Tbl As Table For Each Tbl In ActiveDocument.Tables If Tbl.Rows.Count > 1 Then Tbl.Range.Editors.Add (-1) End If Next ActiveDocument.SelectAllEditableRanges (-1) ActiveDocument.DeleteAllEditableRanges (-1) End Sub The following code select only the header rows: Sub selallHeaders() On Error Resume Next ActiveDocument.DeleteAllEditableRanges (-1) Dim Tbl As Table For Each Tbl In ActiveDocument.Tables Tbl.Rows(1).Range.Editors.Add (-1) Next ActiveDocument.SelectAllEditableRanges (-1) ActiveDocument.DeleteAllEditableRanges (-1) End Sub I have many more such codes that select last rows, all bullets, small / long paras, etc. Watch my following video: https://www.youtube.com/watch?v=p_ZhufliFw8
This comment was minimized by the moderator on the site
There are multiple tables in a document (about 200). I want to select all these tables only and paste them in a new document in the table format. When I select the tables as per above procedure then during paste operation it pastes them as text and not as table. Can you please help me?
This comment was minimized by the moderator on the site
It seeems that this macros does not work in Word 2016
This comment was minimized by the moderator on the site
It works in Word 2016. What error are you getting?
This comment was minimized by the moderator on the site
I understand already. For correct work macros cursor must to be not in table when you call macros. Thank you.
This comment was minimized by the moderator on the site
Very nice method. Thank you
There are no comments posted here yet

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL