Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

WORD 2000 Search And Replace

Posted on 2011-03-23
1
Medium Priority
?
266 Views
Last Modified: 2012-06-21
I need either the correct syntax for the search and replace utility or macro code for following:

I want to find all instances where there is an asterisk "*" in the beginning of a line - then i want delete the ENTIRE line and the ending paragraph mark.
0
Comment
Question by:Yaniv Schiff
1 Comment
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 1000 total points
ID: 35203896
Hmm. A wildcard search should be possible: \**^13 , but it doesn't seem to work (in 2007, anyway).

This macro does, though
Sub Delstar()
    Dim para As Paragraph
    For Each para In ActiveDocument.Paragraphs
        If para.Range.Characters(1).Text = "*" Then
            para.Range.Delete
        End If
    Next para
End Sub

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question