Forum Discussion
JulianAguilar
Mar 03, 2023Copper Contributor
CARET CODE FOR SECTION BRAKE NEXT PAGE
I was trying to format a document using "search and replace", however when trying to replace "section brake next page" I find out that is not listed and I was not able to find the caret code after go...
Mar 03, 2023
JulianAguilar Assuming that you want to replace manual page breaks with Next Page Section Breaks, you will need to use code such as
With Selection
.HomeKey wdStory
With .Find
Do While .Execute(FindText:="^m", Forward:=True, MatchWildcards:=False, Wrap:=wdFindStop) = True
ActiveDocument.Sections.Add Selection.Range
Selection.Collapse wdCollapseEnd
Selection.MoveStart wdCharacter, -1
Selection.Delete
Loop
End With
End With
**bleep**