What I need to do is insert a pagebreak when I find as certain Keyword with out replacing the keyword. I need to do this automatically without any manual steps.
You would go to Edit, Replace. In the Find field type the word you are looking for. In the replace field type the word you are looking for and ^p^m )where ^p is a paragraph mark (enter key) ^m is the page break). -Radix lecti
I just recorded this macro when carrying out the commands - Word does it all for you. I just typed some random words and decided that I wanted to find the word 'night' and then insert a page break after it.
Sub finding()
'
' finding Macro
' Macro recorded 08/01/2003
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = "night"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.EndKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
End Sub
Have a go at doing these sorts of things and letting the program record the macros for you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.