You can't actually insert a section break with a find/replace process, js. A section break, unlike a page break, involves much more than inserting a simple rtf tag. Headers and footers must be defined, and also page numbering, page size and orientation and a number of other settings. If you are interested in replacing a section break for every occurrence of a preinserted tag, like <br>, you might find this macro interesting.js wrote:So I know now how to insert Page Breaks with a macro, but not how to insert sections breaks.
Code: Select all
# This macro will replace a predefined, unique tag or placeholder with a section break. This works much like Find and Replace with PowerFind Pro enabled, and makes up for the lack of a regular expression representing a section break. # INSTRUCTIONS # 1. First insert a unique placeholder (e.g., <br>) wherever you want a section break to occur in your document. This can be done manually or, better, using “Find and Replace”. # 2. Run the macro. # 3. When prompted, choose a section break type (next page, odd page, even page or same page) and click OK. # 4. When prompted again, type in the tag (Case sEnsITive). PowerFind Pro expressions are recognized. # 5. Click OK. #===============================================# $tag = Prompt Input 'Type in the section break placeholder.' $break = Prompt Options "Choose a Section Break type.", "", "OK", "Next Page", "Odd Page", "Even Page", "Same Page" Select All Select Start # While Find $tag, '' # Disables PowerFind Pro regular expressions. If enabled, comment out the following line. While Find $tag, 'E' if $break == "Next Page" Insert:Section Break:Next Page elsif $break == "Odd Page" Insert:Section Break:Odd Page elsif $break == "Even Page" Insert:Section Break:Even Page elsif $break == "Same Page" Insert:Section Break:Same Page end end