Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2005

Tip: Looking for answers? Try searching our database.

Find and Replace in 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ACFalcon - 15 Sep 2005 17:25 GMT
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
Aminc - 15 Sep 2005 22:09 GMT
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
Signature

AminC

> 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
[quoted text clipped - 16 lines]
> Thanks,
> ACFalcon
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.