Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2007

Tip: Looking for answers? Try searching our database.

Would to remove rogue carriage returns (It don't belong there)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 14 Aug 2007 12:18 GMT
I have a very large document I need to edit.
The problem is carriage return appears mid sentence in some cases.
How do I remove only the carriage returns that appear after only 1
word in the line.
In the example below ^13 after the *and* & *taken* would need
removal.

Thanks
Steve

*** Beging Example Text
    The laws relating to investment, taxation, benefits, and
the handling of money are constantly changing and are
often subject to changes in government policy. Whilst
every care has been taken to ensure the
accuracy of the material contained herein at the time of publication
(^13)
*and*
presentation, neither the author, presenter, promoters nor the
publishers will bear any responsibility or liability for any
action(^13)
*taken*
by any person, persons or organisations on the purported basis of
information contained in this book.
*** End Example text
Jay Freedman - 14 Aug 2007 14:51 GMT
See http://www.word.mvps.org/FAQs/Formatting/CleanWebText.htm

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> I have a very large document I need to edit.
> The problem is carriage return appears mid sentence in some cases.
[quoted text clipped - 21 lines]
> information contained in this book.
> *** End Example text
Beeler - 17 Aug 2007 02:23 GMT
If that site doesn't answer it for you, you might try wildcards and variables.
What I've done in the past is find some of the rogue paragraphs by either
inserting a random character combination around the paragraph semi-manually
then replacing that text with what I want automatically.  or if you know that
the carriage returns are always surrounded by a certain set of characters you
can do the wild card searches.  For example:

[A-Za-Z0-9]^13[A-Za-z0-9]  This finds returns marks between any letter or
number
_^13_   finds a carriage return between spaces (replace _ with the spacebar)
or you could combine the two as below:
[A-Za-Z0-9] ^13 [A-Za-z0-9]  (space on either side of the ^13)

You can also add other characters or symbols to help or utilize a not
function.
If the carriage return appears always after one word in a line something
like this might be what you are looking for (substitute _ for space bar):
_[A-Za-Z]*[a-z]^13

I might even use a replace with grouping as:
In the find box:  (_[A-Za-Z]*[a-z])(^13)
In the Replace box:  \1

This probably won't find words that are two letters(ie. at, a, an, etc.),
but you could probably remove those few by hand or use a different search to
help you.

ps. make sure wildcards is checked under options
Signature

-Beeler

> I have a very large document I need to edit.
> The problem is carriage return appears mid sentence in some cases.
[quoted text clipped - 21 lines]
> information contained in this book.
> *** End Example text
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.