Importing Text fm Browser into MSWord

K

Karla Oakley

Hi
I am having trouble importing and then reformatting text that I get from web
pages.


MICROSOFT OFFICE V.X on PowerBook G4 Mac OSX 10.2.3
Internet Explorer 5.2.2 for Mac
Safari 1.0


I have tried to get the text many ways, including cut/paste into Word, into
TextEdit and then Word, Paste Special/text only, pasting from the "view
code" window, etc. and invariably when the text gets into Word each line has
a paragraph break at the end of it.

I searched the Word MVP site and found the following article, which was
spot-on, but it doesn't work:

----------------

Eliminate carriage returns (paragraph marks) at the end of each line but not
at the end of each paragraph

Article contributed by Mark Baird, Bill Coan and Dave Rado

If you have pasted a file into Word in which each ³line² ends with a
paragraph mark and each ³paragraph² ends with two or more paragraph marks: 
1. On the Edit Menu, choose Replace.

2. In the Find What box, enter:
([!^13])(^13)([!^13])
In the Replace With box, enter:
\1 \3
Click the More.. button, and check ³Use Wildcards².
Click Replace All and click OK when Word tells you it has done the
replacement.
This will remove any paragraph marks that are at the end of a line but
within a paragraph.

------------------

(I have also tried running this operation with ^p instead of ^13)

Word never finds any instances. Now, I know that each character is a
Paragraph Break, not a line break or manual break, because when I open a
Find window and search for ^p or for ^13, they get found.
I also did a Find [!^13] and the right thing happened (it found every single
character), however, when I put the formula into the Find box it doesn't get
found. The exact msg is : "Word has finished searching the document. The
search item was not found."

Any info will be greatly appreciated!

P.s. Also, after I do this operation I will be doing the next step in the
MVP article, "Remove all empty paragraphs from a document", so any advice
about issues with that operation will also be appreciated

Thanks!
- Karla
 
E

Elliott Roper

Karla Oakley said:
Hi
I am having trouble importing and then reformatting text that I get from web
pages.


MICROSOFT OFFICE V.X on PowerBook G4 Mac OSX 10.2.3
Internet Explorer 5.2.2 for Mac
Safari 1.0


I have tried to get the text many ways, including cut/paste into Word, into
TextEdit and then Word, Paste Special/text only, pasting from the "view
code" window, etc. and invariably when the text gets into Word each line has
a paragraph break at the end of it.

I do something similar to the MVP article, either by hand or by Macro

My version (with keystrokes of course ;-) )
cmd-shift-h to bring on find and replace panel
search for ^p^p replace with /\ - to hide the double para marks
cmd-a to replace the lot
back at the find and replace:-
^p replace with "space"
then replace "space"^w with "space" - to reduce multiple spaces to
single spaces
and finally
replace /\ with ^p - to insert the real paragraph ends.

I aslo have this macro which I use inside a selection to make it one
paragraph

Sub One_Paragraph()
'
' One_Paragraph Macro
' Macro recorded 21-10-2002 by Elliott Roper
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFind
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " ^w"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFind
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

As you can see, it is exactly the same recipe without the ^p^p to /\
game. By assigning a keystroke to it, it becomes a valuable ally in the
art of web plagiarism.
 
K

Karla Oakley

Brilliant! Worked like a charm!

THANKS!





I do something similar to the MVP article, either by hand or by Macro

My version (with keystrokes of course ;-) )
cmd-shift-h to bring on find and replace panel
search for ^p^p replace with /\ - to hide the double para marks
cmd-a to replace the lot
back at the find and replace:-
^p replace with "space"
then replace "space"^w with "space" - to reduce multiple spaces to
single spaces
and finally
replace /\ with ^p - to insert the real paragraph ends.

I aslo have this macro which I use inside a selection to make it one
paragraph

Sub One_Paragraph()
'
' One_Paragraph Macro
' Macro recorded 21-10-2002 by Elliott Roper
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFind
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " ^w"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFind
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

As you can see, it is exactly the same recipe without the ^p^p to /\
game. By assigning a keystroke to it, it becomes a valuable ally in the
art of web plagiarism.
 

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