[Solved] Removing Paragraph per line of text

Discuss the word processor

[Solved] Removing Paragraph per line of text

Postby Ralph L » Wed Feb 13, 2008 1:09 am

I am switching from Office 97 to Open Office, am a newbie, and need a little help.

Not infrequently I get a file in which each line is a paragraph (terminated by a paragraph mark). Usually there are two paragraph marks or a paragraph mark followed by a tab to delineate real paragraphs. The last instance of this came from an email message from somebody that I pasted into Writer for reformatting.

I would like to remove all the paragraph marks at end of line but keep a paragraph mark at end of paragraph. Under Word 97 the following is a well known way to accomplish this:
1. Do a find/replace on the double paragraph marks, paragraph/tab marks. Replace these with a manual line break or some other special unused character.
2. Find/replace all paragraph marks with nothing thus deleting them.
3. Find/replace the manual line break (or other special character) with a paragraph mark.

Is there any way to accomplish this in Writer. It is important to me if I am going to convert to Open Office.

Thanks
Ralph
Last edited by Hagar Delest on Mon Jun 09, 2008 11:42 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
Ralph L
 
Posts: 13
Joined: Mon Dec 17, 2007 2:34 am

Re: Removing Paragraph per line of text

Postby floris v » Wed Feb 13, 2008 1:59 am

Try this thread: How to delete line breaks with global command?.

Please read the Survival guide for the forum first.

If this solves your problem, please edit the first post of this thread (Edit button) and add [Solved] to the subject line.
MS Windows Vista - AOO 4.0.1 - LibreOffice 4.1.0.4.
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
floris v
Moderator
 
Posts: 3034
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Removing Paragraph per line of text

Postby JohnV » Wed Feb 13, 2008 5:58 pm

I have written a macro to do exactly that.
http://www.oooforum.org/forum/viewtopic.phtml?t=6429
If you are new to macros see this.
http://www.oooforum.org/forum/viewtopic.phtml?t=7995

That topic has been deleted in oooforum. The equivalent is here: [Tutorial] How to install a code snippet.
Last edited by Hagar Delest on Fri Oct 29, 2010 4:12 pm, edited 1 time in total.
Reason: corrected the deprecated link to oooforum.
JohnV
Volunteer
 
Posts: 1509
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: Removing Paragraph per line of text

Postby Ralph L » Mon Feb 18, 2008 1:15 am

[Solved] My problem was finding a way to represent a paragraph mark in Find/Replace. It was not obvious to me from reading Help>Regular Expressions that the needed symbol was $ and the Find/Replace>Regular Expression box needed checking. (Also ^$ is an empty paragraph, although this is obvious from the Help file.) Good writeup at http://openoffice.blogs.com/openoffice/ ... d_rep.html
Ralph L
 
Posts: 13
Joined: Mon Dec 17, 2007 2:34 am

Re: Removing Paragraph per line of text

Postby JohnV » Mon Feb 18, 2008 3:10 am

Be careful when do large document with Find & Replace. When you delete paragraph breaks you form a larger paragraph and OOo has a paragraph character limit of 64K and excess text will be lost. Had to work around that in the macro referenced in the link above.
JohnV
Volunteer
 
Posts: 1509
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: Removing Paragraph per line of text

Postby Hagar Delest » Sun Mar 30, 2008 9:32 pm

JohnV wrote:Be careful when do large document with Find & Replace. When you delete paragraph breaks you form a larger paragraph and OOo has a paragraph character limit of 64K and excess text will be lost.

For the record: Issue 17171 - Paragraph cannot be longer than 65534 characters. Any interested user should subscribe and vote for it (up to 2 votes per issue).
AOO 4.0.1 on Windows 7 and Xubuntu 14.04 (Trusty Tahr)
User avatar
Hagar Delest
Moderator
 
Posts: 25113
Joined: Sun Oct 07, 2007 9:07 pm
Location: France


Return to Writer

Who is online

Users browsing this forum: Google [Bot], jamesd1, twoolds and 29 guests