View Single Post
 
Old 06-06-2024, 04:57 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,166
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

That setting is inherited from the table style so it could be as simple as changing the table style setting if your document is extraordinarily well formatted. However, typically tables have a large number of local formatting applied to them so the style setting is likely to be overridden in various locations so a more direct method will need to be used.

You can apply the AllowBreakAcrossPages setting without having to go to every single row and cell in the table. This avoids the need to worry about tables with merged cells
Code:
Sub TablePageBreaker()
  Dim aTbl As Table
  For Each aTbl In ActiveDocument.Tables
    aTbl.Rows.AllowBreakAcrossPages = False
  Next aTbl
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote