3 Useful Methods to Batch Clear All Table Styles in Your Word Document

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.Batch Clear All Table Styles in Your Word Document

Method 1: Clear the Style of One Word Table

  1. First and foremost, move cursor over the target table until you see the cross sign on the upper left corner of the table.
  2. Next click on the cross sign to select the entire table.
  3. Now you have triggered the “Table Tools”. Click “Design” tab.
  4. Then click on the “More” button in “Table Styles” group to show the drop-down menu.
  5. Choose the “Clear” option.Select Table->Click "Design"->Click "Clear"
  6. 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.
  7. And choose “All Borders”.Click on Drop-down Button Next to "Borders" Command->Choose "All Borders"

Here is the outcome:Effect of Clearing Table Style and Adding Borders

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.

  1. To start with, press “Alt+ F11” to show the VBA editor in Word.
  2. Next click on the “Normal” project on the left column.
  3. Then click the “Insert” on the menu bar.
  4. And choose “Module” on the drop-down menu.Click "Normal"->Click "Insert"->Click "Module"
  5. Open the module’s coding space by double clicking on it.
  6. 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
  1. Finally click “Run”.Paste Macro->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.

  1. Firstly, arrange all documents in one folder.
  2. The repeat steps in method 2 to install and run a macro.
  3. 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
  1. Running the macro, there will be the “Browse” window. Select the folder you store document in step 1 and click “OK”.Choose the Folder->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.

Author Introduction:

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

One response to “3 Useful Methods to Batch Clear All Table Styles in Your Word Document”

Leave a Reply

Your email address will not be published.