Using Excel VBA, how to search for a specific word and insert comments against that word in a Word document?
问题 I am trying to create an excel based tool that reviews Word documents for specific errors. I want this tool to search for a word/sentence and insert a comment against it. I have written a code (please see below) that is able to highlight the word/sentence, however, unable to insert the comment. Here is my code so far: Sub Ref_Figs_Tbls() Dim wdDoc As Object Set wdDoc = ActiveDocument With wdDoc With .Range With .Find .ClearFormatting .Replacement.ClearFormatting .MatchWildcards = True .Wrap =