Apply Uniform Table Borders to All Tables

Situation: You have a document with several tables. The tables have different borders or another border style than desired. You want all the tables to have uniform borders. You may have experienced that this can be rather time-consuming if you have to correct the tables one by one. Here you will find a macro that corrects the table borders of all table cells in all tables in one operation.

Macro solution

Example – before and after executing the macro

In the ApplyUniformBordersToAllTables macro, adjust the border width, style and color to fit your needs. The examples below show how diffent tables will appear after executing the macro with the predefined border settings.

Tables before executing the macro

Example - tables before executing the macro

Tables after executing the macro

Note that the third table contained table cells with no borders. The macro applies borders to such cells too.

Example - tables after executing the macro

How to get the macro

Click the link below to open a window with the macro code:

Related information

See About VBA Macros and Code Snippets and How to Install a Macro for misc. information that may help you in your work with macros and for information about how to install macros.