i have to added blank page in word 2010 after every 3 , 6 , 9 , 12 till the end the below macro run but blank page is not inserted and the format should remain same
Code:
Sub PB()
Selection.HomeKey Unit:=wdStory
With Selection.Find
.MatchWildcards = False
.ClearFormatting
.Text = "^p^p^p ^m"
.Replacement.ClearFormatting
.Replacement.Text = ""
.Execute Replace:=wdReplaceAll
End With
Selection.HomeKey Unit:=wdStory
With Selection.Find
.MatchWildcards = True
.Text = "(^13{3,}*^13{3,}*)^13{3,}"
.Replacement.Text = "\1^m^m"
.Wrap = wdFindStop
.Execute Replace:=wdReplaceAll
End With
End Sub