I need a simple macro/tool that will do the following.
In Excel, I have three columns of text. Each column has many thousands of rows, containing either one single word or a set phrase of several words.
For example, Column A has ‘aquaduct’, and Column B has ‘aqueduct’. Column A has the error; Column B has the correction. Column C would carry a comment, such as ‘This is a spelling mistake’.
I have a source document in Word of up to 300,000 words. I need to run the Excel (VB?) macro against the Word document, finding (or not finding) the mistakes. I then require the mistakes to be generated into a separate Excel file, which will become a ‘report’, a listing of the source document’s errors. I also need the error word, ‘aquaduct’, to be within its context, so it needs to show the two words before and after the error, together with punctuation: so, ‘approaching the aquaduct, Claire realised’. Ideally, I also need the page number from the source document. The report would have columns headed Page / Error / Correction / Comment.
Before I run the tool, I need to set a limit on the number of errors I wish to find. That might be 10, 30, 60 or 100. So if I set it to 30, the tool would stop running either when it got to 30, or when it got to the end of the document (and found, say, 26 errors). Ideally if it stopped before the end of the document, it would be good to know what percentage of the macro had been run. That way, I can determine if 30 mistakes had been found after, say, 37% of the tool, indicating the possibility of further errors, or, say, at 97%, indicating the unlikelihood of further errors.