Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-17-2009, 01:05 PM
p3aul p3aul is offline Strip lf/cr from text Windows XP Strip lf/cr from text Office 2003
Novice
Strip lf/cr from text
 
Join Date: Aug 2009
Posts: 5
p3aul is on a distinguished road
Exclamation Strip lf/cr from text

I have text documents that have Cr at the end of each sentence. It really wrecks havoc trying to convert these texts to an ebook format. I wonder if there is a macro that would strip these cr from the text leaving a cr/lf at the end of each paragraph. If not a macro then a way to use find/replace to do it.


Thanks,
Paul


forgot to mention. OS: Windows XP Pro Office 2003
Reply With Quote
  #2  
Old 08-17-2009, 06:35 PM
Matrix's Avatar
Matrix Matrix is offline Strip lf/cr from text Windows 10 Strip lf/cr from text Office 2010
Admin
 
Join Date: Jan 2005
Posts: 429
Matrix is on a distinguished road
Default

It seems doable with 3 replace operation. Replace cr/lf with a unique phrase '@@' for example; then replace Cr with nothing; Replace '@@' with cr/lf.

Please check out another similar thread.
Reply With Quote
  #3  
Old 08-17-2009, 07:16 PM
p3aul p3aul is offline Strip lf/cr from text Windows XP Strip lf/cr from text Office 2003
Novice
Strip lf/cr from text
 
Join Date: Aug 2009
Posts: 5
p3aul is on a distinguished road
Default

Yes, I checked that one first. Unfortunately, the poster found his solution and didn't share it. Also I try to do a replace operation like this: Find ^|^| Replace: @@

I get the msg: "searched document made 0 replacements"

P
Reply With Quote
  #4  
Old 08-17-2009, 07:22 PM
Matrix's Avatar
Matrix Matrix is offline Strip lf/cr from text Windows 10 Strip lf/cr from text Office 2010
Admin
 
Join Date: Jan 2005
Posts: 429
Matrix is on a distinguished road
Default

In your case, it's cr/lf, not ^|^|.
Reply With Quote
  #5  
Old 08-17-2009, 08:42 PM
p3aul p3aul is offline Strip lf/cr from text Windows XP Strip lf/cr from text Office 2003
Novice
Strip lf/cr from text
 
Join Date: Aug 2009
Posts: 5
p3aul is on a distinguished road
Default

I tried that. Same response
Reply With Quote
  #6  
Old 08-17-2009, 09:36 PM
Matrix's Avatar
Matrix Matrix is offline Strip lf/cr from text Windows 10 Strip lf/cr from text Office 2010
Admin
 
Join Date: Jan 2005
Posts: 429
Matrix is on a distinguished road
Default

Quote:
strip these cr from the text leaving a cr/lf at the end of each paragraph.
Didn't you say there is cr/lf at the end of each paragraph?

The solution is very simple - replace operation, but you must figure what to be replaced.
Reply With Quote
  #7  
Old 08-17-2009, 09:42 PM
p3aul p3aul is offline Strip lf/cr from text Windows XP Strip lf/cr from text Office 2003
Novice
Strip lf/cr from text
 
Join Date: Aug 2009
Posts: 5
p3aul is on a distinguished road
Default

Well when I reveal the codes I see a paragraph symbol at the end of each line, then the next 2 lines each have a single paragraph symbol then another line of text and then the process repeats. What I want to do is have a paragraph symbol only at the end of a paragraph.
Reply With Quote
  #8  
Old 08-17-2009, 09:49 PM
Matrix's Avatar
Matrix Matrix is offline Strip lf/cr from text Windows 10 Strip lf/cr from text Office 2010
Admin
 
Join Date: Jan 2005
Posts: 429
Matrix is on a distinguished road
Default

If your document doesn't contain sensitive information, you can upload it here, I will see if I can find a replace pattern.
Reply With Quote
  #9  
Old 08-17-2009, 10:46 PM
p3aul p3aul is offline Strip lf/cr from text Windows XP Strip lf/cr from text Office 2003
Novice
Strip lf/cr from text
 
Join Date: Aug 2009
Posts: 5
p3aul is on a distinguished road
Default

Ok here is a sample
Thanks,
Paul
Attached Files
File Type: doc This is what it.doc (23.5 KB, 13 views)
Reply With Quote
  #10  
Old 08-18-2009, 12:42 AM
Matrix's Avatar
Matrix Matrix is offline Strip lf/cr from text Windows 10 Strip lf/cr from text Office 2010
Admin
 
Join Date: Jan 2005
Posts: 429
Matrix is on a distinguished road
Default

Your sample text seems to have only one paragraph, I can't give you complete instruction based on it. It's easy to remove those 3 consecutive paragraph marks, just replace ^p^p^p with nothing, but this replace operation may remove the paragraph marks that you want to keep.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strip lf/cr from text Text Field [content control] - Default text color vs Filled Text color jackcoletti Word 3 02-01-2017 08:10 AM
Strip lf/cr from text Drawing lines between text boxes which have actual text within the text boxes RHODIUM Word 6 10-01-2016 04:43 PM
Strip lf/cr from text Format shelf strip graphic and data ShaunO Mail Merge 1 08-19-2016 04:20 PM
Compare text from Bookmark with text from Text box Byron Polk Word VBA 4 07-30-2014 06:18 AM
Strip lf/cr from text strip extra information from email addresses jbk1043 Word 1 03-03-2013 01:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft