![]() |
#1
|
|||
|
|||
![]()
Hi All,
I found some very helpful code on this forum to edit add borders to a table in word via vba. Now, I'd like to tweak that code to add a horizontal border to only every nth row. If possible, i'd like to even specify at which row after the top border to start counting. Here is my code: Code:
Sub modifyactivetable() Dim oTbl With ActiveDocument Set oTbl = Selection.Tables(1) With oTbl .Borders(wdBorderTop).LineStyle = wdLineStyleSingle .Borders(wdBorderLeft).LineStyle = wdLineStyleSingle .Borders(wdBorderBottom).LineStyle = wdLineStyleSingle .Borders(wdBorderRight).LineStyle = wdLineStyleSingle .Borders(wdBorderHorizontal).LineStyle = wdLineStyleSingle .Borders(wdBorderVertical).LineStyle = wdLineStyleSingle '.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleSingle '.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleSingle End With End With Set oTbl = Nothing End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
l39linden | Word Tables | 5 | 10-04-2013 02:06 AM |
![]() |
Hdr | Excel | 1 | 02-04-2013 04:40 PM |
"First column" in word table page break border | mj1856 | Word Tables | 1 | 04-25-2012 03:21 AM |
![]() |
hklein | Word VBA | 4 | 07-18-2011 12:21 AM |
![]() |
The Ink Monitor | Word Tables | 4 | 03-03-2011 09:17 AM |