Thread: [Solved] Find & Replace Unique word
View Single Post
 
Old 05-14-2017, 04:50 AM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,342
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by raghugada View Post
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.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]