Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Search & Replace [with backspace or delete?]

8,142 views
Skip to first unread message

skyki...@my-deja.com

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
I want to eliminate a recurring short paragraph in some documents.

I know how to put the entire contents of the paragraph in the search
field, but how can I put a backspace character in the replace field so
that the blank line will be deleted?

Alternately, putting a [delete] character would work also, I think.

Any help?


Sent via Deja.com http://www.deja.com/
Before you buy.

Beth Melton

unread,
Apr 28, 2000, 3:00:00 AM4/28/00
to
Hi,

Find the search string and replace with nothing - just leave Replace
blank. However you will probably run into the extra lines, actually I
think that's what you are asking about. <g> So here is a macro that
will take care of this. Just select the text and following paragraph
marks you want to delete and run the macro:

Sub ReplaceChar()
Dim findtxt As String
findtxt = Selection.Text
With Selection.Find
.Text = Selection.Text
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
.Text = ""
End With
End Sub

~~~~~~~~~~~
Hope this helps,
Beth Melton
Microsoft Office MVP

Please post replies/further questions to the newsgroup so that all may
benefit.

skyki...@my-deja.com wrote in message
<8ed56r$gf$1...@nnrp1.deja.com>...

Bill Coan [Word MVP]

unread,
Apr 29, 2000, 3:00:00 AM4/29/00
to
Hi SkyKing,

Let's say you have a paragraph like this one that you're reading now.


To replace it, enter the following into the Find What box:

Let's say you have a paragraph like this one that you're reading now.^p

Leave the Replace With box empty and click Replace All.

--
Penny
Templates, wizards, add-ins, and macros for Word
For more information, visit: www.wordsite.com
>
>
<skyki...@my-deja.com> wrote in message
news:8ed56r$gf$1...@nnrp1.deja.com...

skyki...@my-deja.com

unread,
Apr 29, 2000, 3:00:00 AM4/29/00
to
Thanks for the super-quick (and helpful) reply, Beth. It works great!
Just what I needed.


In article <#EfEsjWs$GA.89@cppssbbsa03>,

preachth...@gmail.com

unread,
Jul 1, 2014, 8:38:16 AM7/1/14
to
On Friday, April 28, 2000 3:00:00 AM UTC-4, skyki...@my-deja.com wrote:
> I want to eliminate a recurring short paragraph in some documents.
>
> I know how to put the entire contents of the paragraph in the search
> field, but how can I put a backspace character in the replace field so
> that the blank line will be deleted?
>
> Alternately, putting a [delete] character would work also, I think.
>
> Any help?
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Yes there is in Microsoft Word. For example, if you wanted to replace two SPACEs with two BACKSPACES, then you would do the following in the Find and Replace window.

Find: Press the SPACE bar twice
Replace: ^r^r (These are the circumflex characters for BACKSPACE)

Works great.

Stefan Blom

unread,
Jul 1, 2014, 9:04:18 AM7/1/14
to
To remove blank paragraphs, you need to search for ^p and replace with
nothing.

--
Stefan Blom
Microsoft Word MVP




<preachth...@gmail.com> wrote in message
news:ff02f2a2-49c7-4a6f...@googlegroups.com...

Stefan Blom

unread,
Aug 4, 2014, 5:35:03 AM8/4/14
to
Clarification: Replacing ^p with nothing obviously deletes *all* blank
paragraphs, making the document consist of only one big paragraph, which is
usually not what you want.

If you are searching for a specific text string followed by a paragraph
mark, you can use the following:

This is the text of the paragraph.^p

Replacing that with nothing will delete the entire paragraph.

--
Stefan Blom
Microsoft Word MVP




"Stefan Blom" <Stefa...@discussions.microsoft.com> wrote in message
news:loubkg$lk$1...@dont-email.me...
0 new messages