MS Word not recognizing its own paragraph returns

D

dan.baechlin

Sometimes when I download text and “special paste” it into a Word
document (as unformatted unicode text), it will include a few
paragraph returns that aren’t recognized as such by Word. This is a
problem for designing and using macros. I created several of them to
find and/or replace paragraph breaks, and identified the latter with
the Visual Basic code “^p”. But these macros sometimes leave a few
paragraph breaks untouched. Is there a “quasi-return” code that is
displayed in Word as a paragraph mark but is in fact something else?
If so, what is the Visual Basic code that allows a macro to recognize
it?
 
J

Jay Freedman

Sometimes when I download text and “special paste” it into a Word
document (as unformatted unicode text), it will include a few
paragraph returns that aren’t recognized as such by Word. This is a
problem for designing and using macros. I created several of them to
find and/or replace paragraph breaks, and identified the latter with
the Visual Basic code “^p”. But these macros sometimes leave a few
paragraph breaks untouched. Is there a “quasi-return” code that is
displayed in Word as a paragraph mark but is in fact something else?
If so, what is the Visual Basic code that allows a macro to recognize
it?

This is a known problem with pasting (either special or not) from other
applications or files.
Look at the second bullet item under "Finding & Replacing other special
characters" in
http://word.mvps.org/faQs/General/FindingSpecialCharacters.htm.

Before you do any find/replace for paragraph marks (^p), first do a Replace
All from ^013 to ^p.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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