I am trying to disable spell checking in the currently active Word document using a VSTO add-in. I want to avoid saving the spelling errors in the document's Open XML markup.
I tried to use the Range.NoProofing property.
currentDocument.Content.NoProofing = 1; The MSDN documentation states that this should be set to true, however, the property's type is int. I tried setting it to 1, but it doesn't work (spell checking errors still appear in the document). In the debugger I see that the property is still set to 0 after the assignment.
How to properly use the Range.NoProofing property or is there any other way to disable spell checking in a Word document?