Paragraph Characters in a text document

K

Kirk

I am trying to remove the paragraph character (^p) from the end of each line
in a text document and leave it at the end of the paragraphs. To do this, I
do a "find and replace" for ^p^p. When I do this in a text document, word
2007 freezes and I have to restart it. If I save the file as a .docx, close
it and reload the .docx, the find and replace works. A find on one ^p works
with no problems.
Does anyone know why? It's a pain to have to save and reload the files.

Kirk
 
C

Cindy M.

Hi Kirk,
I am trying to remove the paragraph character (^p) from the end of each line
in a text document and leave it at the end of the paragraphs. To do this, I
do a "find and replace" for ^p^p. When I do this in a text document, word
2007 freezes and I have to restart it. If I save the file as a .docx, close
it and reload the .docx, the find and replace works. A find on one ^p works
with no problems.
Does anyone know why?
My best guess would be it's because the text file has used some ANSI character
combination that Word is recognizing as ^p, but can't parse as it normally
would. When you save the file as a Word document, the conversion mechanism
takes care that things "jive" correctly.

Most programs use a combination of "new line" (ANSI 10) plus "carriage return"
(ANSI 13) to generate a "new paragraph". Word bases more or less on ANSI 13
(there have been some changes, recently, but historically this has been the
case and it's what Word's old, core code expects).

You might try replacing every instance of ^p with some unique character. Then
do the double-character search and replace it with a single ^p. Then search the
unique character and remove it. Similar to what you're trying, but a little
different :)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top