Hi Andrew,
As per my last post, the lot could be done with a single wildcard Find/Replace. Here's the macro version:
Code:
Sub CleanupPayslips()
With ActiveDocument.Content.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "[^13 ]{7,}(<[0-9]{7}>)"
.Replacement.Text = "^p^12 \1"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
End Sub
The OP could also have achieved the desired pagination just by changing the page margins...