Ask Your Question
1

How can I insert (or remove) page breaks throughout a document via search and replace? [closed]

asked 2012-06-27 13:54:15 +0100

updated 2014-05-31 17:20:44 +0100

manj_k gravatar image

I have a document that will eventually be 100 pages and there is a unique piece of text at the beginning of each page. I would like to search for that text and replace it with a page break followed by the text. I am generating the document via another program so if I needed to place something that could be completely replaced by a page break I could also do that. The real question is how to put page breaks in the search and replace dialog.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-16 22:16:41.536041

1 Answer

Sort by » oldest newest most voted
1

answered 2012-06-27 14:27:07 +0100

tohuwawohu gravatar image

The problem is that page breaks are properties of the first paragraph on a page, so they aren't accessible for search & replace using regular expressions. In your case, a solution would be to assign a special paragraph style to all those "first paragraphs". AFAIK you can't do this using the built-in search and replace, but there's a LibreOffice Writer extension that allows for this (available for OpenOffice, too). Hope this works for you.

edit flag offensive delete link more

Comments

Sorry, but I'm used to stack exchange sites Is there a way to "accept" this answer? I don't have enough karma to upvote it, or is there something else I should do? The extension worked exactly the way I wanted it to. Fantastic thanks

dshimer gravatar imagedshimer ( 2012-06-27 15:24:03 +0100 )edit

Happy to hear that the extension solved the problem! - It seems that the askbot software still has some issues yet, i'm missing some features familiar from stackexchange, too...

tohuwawohu gravatar imagetohuwawohu ( 2012-06-27 15:49:37 +0100 )edit

Question Tools

Stats

Asked: 2012-06-27 13:54:15 +0100

Seen: 10,996 times

Last updated: Jun 28 '12