Solved

WORD 2000 Search And Replace

Posted on 2011-03-23
1
257 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

777 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