Cannot "find" double space to replace with single (help?)

B

Bill Weylock

I have a frequent procedure used to clean text pulled off web pages or out
of emails.

There is a macro in BBedit, I think, but it¹s easier to do it this way in
word, and it preserves formatting.

I change all double returns to an unnatural string (usually @@@@), then
replace all single returns with a space (so the last word on a line will not
combine with the first word on the next).

That leaves me with a document filled with double spaces between words.

No problem. I just search for double spaces and replace globally with single
spaces.

I¹ve never had a whisper of a problem in the past. Now in Word 2004 the Find
field will no accept two consecutive spaces. No matter how many times I
press the space bar, it remains one space.

What on earth is going on, and how can I stop it??

Thanks!


Best,


- Bill
 
E

Elliott Roper

Bill Weylock said:
I have a frequent procedure used to clean text pulled off web pages or out
of emails.

There is a macro in BBedit, I think, but it¹s easier to do it this way in
word, and it preserves formatting.

I change all double returns to an unnatural string (usually @@@@), then
replace all single returns with a space (so the last word on a line will not
combine with the first word on the next).

That leaves me with a document filled with double spaces between words.

No problem. I just search for double spaces and replace globally with single
spaces.

I¹ve never had a whisper of a problem in the past. Now in Word 2004 the Find
field will no accept two consecutive spaces. No matter how many times I
press the space bar, it remains one space.

What on earth is going on, and how can I stop it??

I don't have 2004 yet, but this works for reducing multiple spaces to
one
" ^w" without the quotes of course. Oh, and wildcard searches off.
 
B

Bill Weylock

Elliott -


I've never really understood the ^w concept, probably because I've never
looked into it deeply.

Is the syntax for what you just suggested "space carat w"?

If so, I search for that and replace it with a single space? And (suddenly
getting it) that will also replace a string of three or four spaces with a
single space, right? That could have saved me some time over the years.
Sigh.

Thanks.
 
E

Elliott Roper

Bill Weylock said:
Elliott -


I've never really understood the ^w concept, probably because I've never
looked into it deeply.

Is the syntax for what you just suggested "space carat w"? yep

If so, I search for that and replace it with a single space? And (suddenly
getting it) that will also replace a string of three or four spaces with a
single space, right? That could have saved me some time over the years.
Sigh.
OK, since it's you Bill, here is a macro to do the job of turning all
the selected text into 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

Disclaimer: That macro looks like I knew what I was doing. Far from it.
All I did was record the recipe, then remove the mistakes and un-needed
malarkey. ;-)

I have assigned it a keystoke combo. It works like a dream for
plagiarising webby things. You will notice the " ^w" hard at work in
there.

I also use your technique first replacing ^p^p with something daft,
replacing all ^p with space then replacing daft with ^p and finally
replacing " ^w" with space. It is more brutal. I use that as a first
pass for cleaning up other people's messes.
 
B

Bill Weylock

Elliott -


That's great for one paragraph. I usually have several. If I run the replace
on ^p^p first, it will be a big help though.

Thanks!


Best,


- Bill

There used to be a great little program called McSink that would do such a
great job of this. There have been other utilities over the years. I'm sure
I have several on the drive. It's just harder to remember how to use them
than it is to do the routine in Word.


Best,


- Bill
 
B

Bill Weylock

Beth -


Thanks very much.

I already own something called Smartwrap. You reminded me. :)

I forget to use it, but I just checked it out again to find that it works
fine. It scrubs any text that will fit into the clipboard and operated as a
plugin with Eudora. I'll write them about Entourage.

TextSoap looks great, but I hate to spend another $20 - $30 on yet another
one.

Also, it seems to me that I use this kind of thing much less frequently than
I used to. In years past I was dementedly active on CompuServe, and I used
it at least once a day. Now it's fairly infrequent.

Thanks again!


Best,


- Bill
 

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