Quote:
Originally Posted by raghugada
I want to maintain the track changes only for the exact word match.
Need to know the original word in track change so that we can track of which word is replace by which one
|
In that case, since you're using symbols and '.MatchWholeWord = True', you'd do better to drop that and replace it with .MatchWildcards = True'. Then, to get whole words with case-matching, prefix the Find expression with a < chevron and suffix it with a > chevron. You could use 'Track Changes' for just that F/R expression and not for the same expression without the boundary chevrons. Beyond that, your automation code looks peculiar, to say the least. To see how to automate Find/Replace using an Excel data source, check out:
https://www.msofficeforums.com/word-...html#post34254
and:
https://www.msofficeforums.com/word-...html#post61795
and, for a demonstration of how even the Find/Replace formatting can be specified:
https://www.msofficeforums.com/word-...html#post93796
The first two process multiple documents, though the folder-processing code could be omitted and the document reference changed to just the active document, as per the code in the third link.