Created
April 28, 2012 03:05
-
-
Save r-plus/2515348 to your computer and use it in GitHub Desktop.
modify the table style in MS-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
| Sub ModifyTableStyle() | |
| On Error Resume Next | |
| For Each i In ActiveDocument.Tables() | |
| ' Stroke around table at bold single line. | |
| With i.Borders(wdBorderTop) | |
| .LineStyle = wdLineStyleSingle | |
| .LineWidth = wdLineWidth150pt | |
| .Color = Options.DefaultBorderColor | |
| End With | |
| With i.Borders(wdBorderLeft) | |
| .LineStyle = wdLineStyleSingle | |
| .LineWidth = wdLineWidth150pt | |
| .Color = Options.DefaultBorderColor | |
| End With | |
| With i.Borders(wdBorderBottom) | |
| .LineStyle = wdLineStyleSingle | |
| .LineWidth = wdLineWidth150pt | |
| .Color = Options.DefaultBorderColor | |
| End With | |
| With i.Borders(wdBorderRight) | |
| .LineStyle = wdLineStyleSingle | |
| .LineWidth = wdLineWidth150pt | |
| .Color = Options.DefaultBorderColor | |
| End With | |
| ' modify title row except merged cell contain table. | |
| With i.Rows(1).Range() | |
| .Font.Bold = True | |
| .Font.Color = -603914241 | |
| .Shading.Texture = wdTextureNone | |
| .Shading.ForegroundPatternColor = wdColorAutomatic | |
| .Shading.BackgroundPatternColor = -603946753 | |
| With .Borders(wdBorderBottom) | |
| .LineStyle = wdLineStyleDouble | |
| .LineWidth = wdLineWidth050pt | |
| .Color = wdColorAutomatic | |
| End With | |
| End With | |
| Next | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment