Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-25-2012, 03:21 AM
macropod's Avatar
macropod macropod is offline "First column" in word table page break border Windows 7 64bit "First column" in word table page break border Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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
To see how to install & run a macro, go to: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
word table borders



Similar Threads
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
"First column" in word table page break border Mailing: how to make the "page number" in Word is the same as "row number" in excel w 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
"First column" in word table page break border why the "page break" notation appears improperly? Jamal NUMAN Word 1 07-19-2011 03:39 AM
"First column" in word table page break border Word 2010: "Screen shot" and "Print Screen" and fitting the page boundaries! Jamal NUMAN Word 4 06-30-2011 05:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:01 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft