Cleaning up page breaks in Author-it’s Word outputJune 11, 2008
One of the only things I do to a Word document after I’ve published it from Author-it is to check the page breaks and remove excess ones. This is to save paper by minimizing the number of half-filled or almost-empty pages that might be printed by readers.
I used to do it a page at a time in Print Preview mode, manually removing the AllowPageBreak style’s 1pt marker. But that can take about 15 minutes or so on a 400 page document.
To speed it up, I then used this method:
- Open Word’s Find and Replace window (Ctrl+H) and replace all instances of the AllowPageBreak style with nothing. This gets rid of them all.
- Click the little AA button (Word 2003) on the far left of the formatting toolbar to display the list of styles in the task pane.
- Scroll through the document looking for places where you need to force a page break. When you find one, put your cursor in the empty paragraph in front of it (NOT on the heading) then click the AllowPageBreak style listed in the task pane.
- Select the entire document (Ctrl+A), then press F9 to update the page numbers.
This takes very little time as there tend to be less AllowPageBreak styles to add using this method than there were to remove using my old method.
And to make it automatic and even quicker, I now use an AfterPublish macro then add in the page breaks I need (see steps 3 and 4 above):
Sub RemoveAllowPageBreakStyle() ' ' RemoveAllowPageBreakStyle Macro ' Macro recorded 5/28/2008 by rbracey ' Selection.Find.ClearFormatting Selection.Find.Style = ActiveDocument.Styles("AllowPageBreak") Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "" Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll End Sub