Lene Fredborg, DocTools, har hvert år siden 2008 modtaget den prestigefyldte pris som Microsoft Most Valuable Professional (MVP) i Word – link til information om MVP Award'en DocTools - dokumentautomatisering - add-ins, makroer og skabeloner til Microsoft Word (logo) Dokumentautomatisering
Add-ins & Makroer
Skabeloner
Til Microsoft Word
Dokumentautomatisering, skabeloner (templates), add-ins og makroer til Microsoft Word (grafik)



Bogmærk denne side | Tip en ven om DocTools


Søg thedoctools.com:

Custom Search



Macros...

Macro – 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.

Terms of use

You are welcome to use the macros and Word tips provided on this website. The contents is copyright. You may not reproduce any of contents (with or without modification or credits) elsewhere on the web, or on CD. Please link to the contents on this website instead.

Please note that all free Word tips, macros, add-ins and demos are provided "as is" and without obligation. See also detailed Terms of use.


26-Sep-2008: The macro has been modified to prevent errors in case of tables with only one row or one column.

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 of 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 of tables efter executing the macro


Related information

See general information about VBA macros and code snippets, incl. information about how to install macros.



Top of page

Back to Macros...




Copyright © 2006-2017 Lene Fredborg – DocTools ApS – alle rettigheder forbeholdt | Microsoft Word skabeloner (templates) – add-ins – VBA makroer | Spar tid og arbejd mere effektivt i Microsoft Word
Privat politik | Betingelser for brug | Om cookies | Bogmærk denne side | Tip en ven | Links | Kontakt