In this article, we will focus on demonstrating you 3 useful methods to batch clear all table styles in your Word document.
Every once in a while, if a Word table is applied with an undesired style or it reduces the visual effect of the entire document, you need to clear its style. Now let’s show you how to accomplish such a task.
Method 1: Clear the Style of One Word Table
- First and foremost, move cursor over the target table until you see the cross sign on the upper left corner of the table.
- Next click on the cross sign to select the entire table.
- Now you have triggered the “Table Tools”. Click “Design” tab.
- Then click on the “More” button in “Table Styles” group to show the drop-down menu.
- Choose the “Clear” option.
- Now the table style is removed. So are all table borders. To add borders to table, make sure the table is selected. And click on the drop-down button next to “Borders” command.
- And choose “All Borders”.
Here is the outcome:
Method 2: Batch Clear All Table Styles in One Document
Once we have done the single table, the topic of batch processing cannot be missed. First, let’s see how to clear all table styles in a document via VBA.
- To start with, press “Alt+ F11” to show the VBA editor in Word.
- Next click on the “Normal” project on the left column.
- Then click the “Insert” on the menu bar.
- And choose “Module” on the drop-down menu.
- Open the module’s coding space by double clicking on it.
- Now paste the following macro there:
Sub ClearTableStylesInADoc() Dim objTable As Table Dim objDoc As Document Application.ScreenUpdating = False Set objDoc = ActiveDocument For Each objTable In objDoc.Tables objTable.Style = "Table Normal" objTable.Borders.Enable = True Next objTable Application.ScreenUpdating = True Set objDoc = Nothing End Sub
- Finally click “Run”.
This macro clears all table styles in a document, applies “Table Normal” style to them, and adds table borders as well.
Method 3: Batch Clear All Table Styles in Multiple Documents
Now in case you have a couple of document to deal with, here is the macro to clear all table styles in multiple documents.
- Firstly, arrange all documents in one folder.
- The repeat steps in method 2 to install and run a macro.
- Only this time, remember to replace with this macro:
Sub ClearTableStylesInMultiDoc() Dim objTable As Table Dim objDoc As Document Dim StrFolder As String Dim strFile As String Dim dlgFile As FileDialog Set dlgFile = Application.FileDialog(msoFileDialogFolderPicker) With dlgFile If .Show = -1 Then StrFolder = .SelectedItems(1) & "\" Else MsgBox "Select a folder first." Exit Sub End If End With strFile = Dir(StrFolder & "*.docx", vbNormal) While strFile <> "" Set objDoc = Documents.Open(FileName:=StrFolder & strFile) Set objDoc = ActiveDocument For Each objTable In objDoc.Tables objTable.Style = "Table Normal" objTable.Borders.Enable = True Next objTable objDoc.Save objDoc.Close strFile = Dir() Wend End Sub
- Running the macro, there will be the “Browse” window. Select the folder you store document in step 1 and click “OK”.
Leave the rest of work to the macro then.
Ways to Regain Lost Documents
By lost documents, we mean the documents get compromised due to Word corruption or human errors. While dealing with such documents, you should always keep in mind that they can be retrieved with the help of some advanced repairing tool.
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair xls and pdf repair software products. For more information visit www.datanumen.com
Thanks for the writeup, its informative.