Created
November 24, 2020 19:27
-
-
Save erictleung/f22a42e69ffcbfcfd6b807b0748f9ff2 to your computer and use it in GitHub Desktop.
Automate table formatting in Microsoft Word
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ' Inspired by | |
| ' https://github.com/jgm/pandoc/issues/3275#issuecomment-448262352 | |
| Sub TableDefaultOptions() | |
| Dim tbl As Table | |
| For Each tbl In ActiveDocument.Tables | |
| tbl.Style = wdStyleTableLightGridAccent1 | |
| tbl.ApplyStyleFirstColumn = False | |
| tbl.ApplyStyleLastColumn = False | |
| tbl.ApplyStyleLastRow = False | |
| tbl.ApplyStyleRowBands = True | |
| tbl.ApplyStyleHeadingRows = True | |
| tbl.PreferredWidth = 400 | |
| Next tbl | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment