How do I prevent viewing the Excel spell check pop up that opens when I run the following code? And also when a spelling correction is made, I want to store the particular cell in an array.
xlWorkSheet.CheckSpelling(Type.Missing, true, false, Type.Missing);
This code does the proper spell checking but it shows the spell check pop up. I would like to prevent that, and also store all the corrected words in an array.
If you use the CheckSpelling method of Excel’s Application object, rather than the Worksheet object or Range object, it will return a True or False and not display the dialog. It only checks one word, though, so you have to loop through the range cell-by-cell, then split the cell’s contents on the space character, then loop through the array of words and pass them into Application.CheckSpelling.