![]() |
#2
|
||||
|
||||
![]()
Hi mj1856,
Here's a macro to correct the table's formatting - even if changes in your document's layout changes which rows are on a given page. Simply position the selection point anywhere in the table then run the macro. Code:
Sub CorrectTblBorders() Application.ScreenUpdating = False Dim Tbl As Table, iRw As Long, iPg As Long With Selection If .Information(wdWithInTable) = False Then Exit Sub Set Tbl = .Tables(1) End With With Tbl .Style = .Style iPg = .Rows(1).Range.Information(wdActiveEndPageNumber) If .Range.Characters.Last.Information(wdActiveEndPageNumber) = iPg Then GoTo Done For iRw = 2 To .Rows.Count If .Rows(iRw).Range.Information(wdActiveEndPageNumber) = (iPg + 1) Then .Rows(iRw - 1).Cells(1).Borders = .Rows(.Rows.Count).Cells(1).Borders iPg = iPg + 1 End If Next iRw End With Done: Set Tbl = Nothing Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
word table borders |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
why the "section break-next page" is switched to "section break-continuous"? | Jamal NUMAN | Word | 6 | 12-14-2011 03:35 PM |
![]() |
Jamal NUMAN | Word | 1 | 09-03-2011 11:37 AM |
How to edit the "Format" and the "show level" of an EXISTING table of content? | Jamal NUMAN | Word | 2 | 08-14-2011 10:46 AM |
![]() |
Jamal NUMAN | Word | 1 | 07-19-2011 03:39 AM |
![]() |
Jamal NUMAN | Word | 4 | 06-30-2011 05:48 PM |