Hi fellow coders...
I've written some code to take a column of keywords (comprising one or more words) and highlight all occurrences in a Word document that I open by creating a Word object. The code successfully opens the file and finds the keywords if they are an exact match. The issue is that some of the keywords in the Word doc include IP-related names, so if the keyword is, e.g. Fisher Price toy, the term Fisher Price® toy in the Word doc would not be picked up.
The .IgnorePunct property only matches if the only difference is something like a full colon (which makes sense). I've experimented with the .MatchFuzzy properties, but the one I thought would work (.MatchFuzzyWord) returns a "Runtime Error 438: Object doesn't support this property or method". Is this an issue because I'm calling it from Excel?
I would also like to catch singular vs plural differences, as the current properties aren't doing that, e.g. keyword=Fisher Price toy, Word doc=Fisher Prices toys
I have added the Word reference library.
Here's the part of my code with the .Find properties...
Looking forward to being enlightened![]()
Please Login or Register to view this content.
![]()
Bookmarks