Howdy,
I am trying to clear the KeepWithNext flag for all the paragraphs in every table in the document but the ones in table headings.
What's the best way to do that.
At the moment I only have the following script that clears the KeepWithNext flag for every paragraph in every table.
Sub ClearKeepWNext() Dim t As Table For Each t In ActiveDocument.Tables t.Range.ParagraphFormat.KeepWithNext = False t.AutoFitBehavior (wdAutoFitContent) Next End Sub
This results in table headers split so that many tables have only the table header at the bottom of the page where all other table rows start on the text page.
What would be the best way to fix that?
Thank you in ad