Solved

WORD 2000 Search And Replace

Posted on 2011-03-23
1
258 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:Forensicon
1 Comment
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 250 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…

830 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