mentby.com
Blog | Jobs | Help | Signup | Login

Hard page break: search and replace



Hi all,
Googled high and low and nothing even close to a solution. Here's the
problem. I'm using mail merge to convert data in a spreadsheet into a nice
report formatted the way I want. Everything is great except that OOo wants
to put a hard page break following every record (83,000 of them) but I want
the records to flow from one to the other without even a line break. (Don't
panic! There are line breaks but they don't come at the end of every
record). So what I would like to do is one of the following:
1. Let OO insert the page breaks and then I use a search/replace to convert
them all to a single space, or
2. Convince mail merge somehow not to put hard page breaks at the end of
every record. Instead it can put whatever it wants as long as I can find it
using a regular expression (so a newline is fine with me. But Openoffice,
unlike WordPerfect (ahem ;)) makes it impossible to find page breaks.

Any solutions will be rewarded by warm thoughts directed towards the genius.
Thanks,
Jonathan
--
Registerd Linux user #445917 at  http://counter.li.org/
Please do not send me copies of list mail. I read the lists. Thanks!


Jonathan Kaye Tue, 18 Aug 2009 08:44:45 -0700

news:h6ei8g$ehg$1*******

See if this is any help:

\n in Find and Replace:
Represents a line break that was inserted with the Shift+Enter key
combination. To change a line break into a paragraph break, enter \n in
the Search for and Replace with boxes, and then perform a search and
replace.

\n in the Search for text box stands for a line break that was inserted
with the Shift+Enter key combination.

\n in the Replace with text box stands for a paragraph break that can be
entered with the Enter or Return key.

I haven't played with it, but it looks like the right area.  Help: Find
tab, enter "find page break" without the quotes.

You'll note there are additional finds listed there also.

HTH,

Twayne`


Twayne Tue, 18 Aug 2009 16:36:47 -0700

Hi Twayne
Sorry but I'm not looking for a line break. I'm familar with regular
expressions and know how to use them. I am looking for a hard page break or
whatever code the mail merge routine inserts after each record. It is NOT
repeat NOT a line break. It is a page break and I want to find them a get
rid of them.

Thanks for the effort but it doesn't help.
Cheers,
Jonathan

--
Registerd Linux user #445917 at  http://counter.li.org/
Please do not send me copies of list mail. I read the lists. Thanks!


Jonathan Kaye Tue, 18 Aug 2009 23:53:17 -0700

Hi Jonathan,

try this extension: http://extensions.services.openoffice.org/project/AltSearch

Haven't tested it, but might be what you're searching.

Uwe
--
   ufi******* -  Technical Writer
   StarOffice - Sun Microsystems, Inc. - Hamburg, Germany
    http://documentation.openoffice.org/
    http://wiki.services.openoffice.org/wiki/Documentation
    http://blogs.sun.com/oootnt
    http://user.services.openoffice.org/en/forum


Uwe Fischer Wed, 19 Aug 2009 04:47:46 -0700

news:h6g7g1$q63$1*******

Sorry for the misinterp, Jonathan.

You seem to be right; I can't believe I've never searched for that
myself, but I can't find a way either.  There must be a way<g>.

We need one of the gurus to check in on this one I guess; you're not
getting a lot of responses so far.

Cheers,

Twayne`


Twayne Wed, 19 Aug 2009 09:27:46 -0700

Please try the following. It works in a simple case in which I
deliberately created a 4-page document by inserting a manual page break
before each of lines 2, 3 & 4 of what started as a 4-line document.

    * Select the entire document except the first record (Ctrl-A probably).
    * Go to menu Format>Paragraph>Text Flow
    * Uncheck the box labelled "Insert" under the heading "Breaks" near
      the middle of the pane.
    * Click OK.

You *might* end up with a blank line after each record (I did). If so,
use the Regular Expression "^$" (without the quotes) to get rid of those
empty lines (change all occurrences of it to the null string).

--
Harold Fuchs
London, England
Please reply *only* to users*******


Harold Fuchs Wed, 19 Aug 2009 09:30:49 -0700

Hi Harold,
Actually that was the first one I tried (after some googling I found it). No
joy at all. It seems that entering a manual page break is not the same as
the code that follows each record in a mail merge. You'll see from my
posting labelled [Solved] that I did find a hack that works. Now I'm trying
out the extension suggested by Uwe which I've now installed. It looks like
it should work... we'll see. I'll report back on it.
Cheers,
Jonathan
--
Registerd Linux user #445917 at  http://counter.li.org/
Please do not send me copies of list mail. I read the lists. Thanks!


Jonathan Kaye Wed, 19 Aug 2009 10:17:19 -0700

Harold, Please see new Post titled "Find Page Breaks?" It's an extension
of this conversation but goes off in a different direction.

Thanks,

Twayne`

news:4A8C28B3.3030908*******

Twayne


Twayne Wed, 19 Aug 2009 10:25:07 -0700

Hi Uwe,
I installed and tried out the extension you suggested. These page breaks at
record ends refuse to die. I can search for them using \m and it keeps
finding them, replacing them with a space and at the end of the task, all
the page breaks are back and nothing has changed. Only deleting the two \n
in a row seems to get rid of them. ????
Cheers,
Jonathan
--
Registerd Linux user #445917 at  http://counter.li.org/
Please do not send me copies of list mail. I read the lists. Thanks!


Jonathan Kaye Wed, 19 Aug 2009 10:29:49 -0700



Related Topics

Post a Comment