View Single Post
 
Old 09-23-2013, 12:14 PM
slaycock slaycock is offline Windows 7 64bit Office 2013
Expert
 
Join Date: Sep 2013
Posts: 256
slaycock is on a distinguished road
Default

You could write a macro to scan the document and set a page break before for each paragraph following your style. The code below is probably not the most elegant but would do the job.

Sub myPageBreakAfter()

Dim myParagraph As Paragraph
Dim LastParaIsMyStyle As Boolean

LastParaIsMyStyle = False

For Each myParagraph In ActiveDocument.Paragraphs
If LastParaIsMyStyle Then
myParagraph.PageBreakBefore = True
End If

If myParagraph.Style = "mySpecialStyleName" Then
LastParaIsMyStyle = True
Else
LastParaIsMyStyle = False
End If
End Sub
Reply With Quote