View Single Post
  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Unwanted paragraph breaks when pasting text

Hi Peter,

Two points:

- For the AutoFormat method, you skipped over this statement in the "Note"
in Suzanne's description: "In Word 2007, you will have to add an AutoFormat
button to the Quick Access Toolbar (QAT) from the "Commands Not in the
Ribbon" section of the Office Button | Word Options | Customize dialog." If
you don't want to do that, I think you'll find that the keyboard shortcut
Ctrl+Alt+K is assigned by default to the AutoFormat Now command.

- The Replace method is complicated but, as Suzanne said, "If you want to
automate any of the above steps you can record them using the macro recorder
and play them back as needed."

--
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.

PeterSJC wrote:
Paul, unfortunately, pasting "text only" does not seem to work. When
I first paste the text, it is placed into the Word document with the
original document's font and with single-spaced lines, each ending
with a paragraph mark. If I then click the clipboard icon (which is
probably the equivalent of the glue icon in the version of Word that
you are using) and select "Keep Text Only", the font changes to
whatever I am using in Word, and each of those single-line
"paragraphs" now takes the settings that I am using for paragraph
spacing. In other words, "Keep Text Only" pastes the text without its
original formatting, but that text includes the paragraph breaks that
were apparently placed at the end of each line in the clipboard.

Jay, thanks for the link to the "Cleaning Up Pasted Text" article on
Suzanne Barnhill's MVPS page. The article outlines two approaches
("Using Auto Format" and "Using Find and Replace"):

In "Using Auto Format" the article says:

"...In Word 2007, find this tab at Office Button | Word Options |
Proofing: AutoCorrect Options. No matter what other AutoFormat
options you have enabled here, when you select a block of text with a
paragraph break at the end of each full line, AutoFormat will delete
all the paragraph breaks but the last."

Following those instructions, I see that all boxes are checked in the
AutoFormat tab. Most of the boxes are checked in the AutoFormat As
You Type tab are also checked, though none of those seem relevant to
the the problem at hand. So, I close the menu, go back to my text,
and select a few paragraphs. But now what? Is Barnhill saying that
just selecting paragraphs triggers Auto Formatting? Apparently not,
because nothing happens. On the other hand, I cannot find any Auto
Format command, so I move on to Barnhill's second approach.

"Using Find and Replace"

Barnhill's advice (to put ^l^l into the "Find what" box) does not
work,
which doesn't surprise me, because there are no line breaks (^l) to
be found. Remember, they have all been converted to paragraph breaks.
However I was able to get what I want by modifying her approach, as
follows:

FIRST PASS:
1. Press Ctrl+H to open the Replace dialog.
2. In the "Find what" box, type ^p^p (which finds the two consecutive
paragraph breaks that occur in those places where I actually want a
paragraph break).
3. In the "Replace with" box, type **EOP** (an arbitrary string not
found anywhere else in the document).
4. Click Replace All. I now have a paragraph break at the end of each
true paragraph.

SECOND PASS (the Replace dialog is still open):
1. In the "Find what" box, type ^p (which finds all of the unwanted
paragraph breaks).
2. In the "Replace with" box, type a space.
3. Click Replace All.

THIRD PASS (the Replace dialog is still open):
1. In the "Find what" box, type **EOP** (the arbitrary string I used
in
Pass 1, to mark all of the paragraph breaks I want to keep).
2. In the "Replace with" box, type ^p (a paragraph break).
3. Click Replace All.
4. Click Close to close the Replace dialog box.

We are done. It seems like a lot of work to do something that should
be automatic (I can't be the only person who wants to copy text that
Internet Explorer renders as a paragraph into a similar paragraph in
Word), but it was much easier than deleting the paragraph breaks
individually.

Thanks,
Peter
Using Vista Ultimate (32 bit) SP 2, Internet Explorer 8 (when
browsing a
web page that doesn't like Chrome), and Office Word 2007 SP2