I've got a part of a document selected, and now I want to replace all manual page and section breaks (the latter of all types, such as next page even, next page uneven, next page, continuous, column) within that selection.
I tried to record a macro while using words advanced find/replace searching for [^m^b], but that did not work (found nothing in a document that I'd spammed with the breaks for testing).
So I tried to handle section and page breaks separately, first selecting, then replacing one type, selecting again, replacing the other type. This way, the second search (for section breaks) for some reason also touched a part of the document before the selection.
However, how do I search for the special section breaks? The advanced find UI has no option to search specifically for them, but the regular section break search does not find everything. Also, I assume there is a way to do all in one go.
An update, I'm now trying the section breaks separately. The macro below does replace all section breaks, but does something weird and wrong. I've got four section breaks, all of type continuous before the selection, then one section break of type next page and one section break of type even page in the selection. After running a macro for replacing section breaks the last section break before the selection changes from type continuous to type even page.
Sub break2() Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^b" .Replacement.Text = "" .Forward = True .Wrap = False .Format = False .MatchCase = False .MatchWholeWord = False .MatchKashida = False .MatchDiacritics = False .MatchAlefHamza = False .MatchControl = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll End Sub