Find and Replace in 2000

A

ACFalcon

I have a macro that finds certain values and replaces them with bold versions
of the values. The macro works fine in Word 2003, but fails in Word 2000
even though the macro was made in Word 2000. Is there a problem with the
find and replace functionality in Word 2000? How do I do a find and replace
in Word 2000, if it is even possible?

Here is the error I get when I try to run the macro in Word 2000.....
"Invalid procedure call or argument"

Here is some of the code.....
Dim oRng as Range
Set oRng = Doc.Range
With oRng.Find
.Text = "Test Value" !!!!!!ERROR OCCURS HERE!!!!!!!
.Replacement.Text = "Test Value"
.Replacement.Font.Bold = True
End With

Thanks,
ACFalcon
 
A

Aminc

Not sure how the error can occur on the line you identified and commented. In
the piece of your code, I have a problem with line "Set oRng = Doc.Range".
Because Doc.Range is not identified. Try replace Doc.range with
ActiveDocument.Range
 

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