Question

I have been trying to enable spell check for mergefields after they have been resolved to text (after mail-merge). By default Word does not do it. The workaround is to set the proofing language in Word and un-check the "Do not check spelling or grammar" tick box, however, I want to do this programmatically. I have tried setting Range.LanguageID and other options using Word Interop with no results. The text that comes from mergefields is not spell checked (spelling errors are not underlined). Can you please advise how this could be resolved? Thanks

Was it helpful?

Solution

In the end I modified the rtf document. I realised that there were \noproof tags in the rtf document and after finding out what they meant I decided to remove them. I've also removed \lang1024 and \langfe1024 which seemed to appear before each \noproof tag. Apparently they store information about the language of the formatted field/paragraph. The end result is that the text that comes from merge fields is now spell checked, which is what I wanted. I haven't been able to find any other solution. I hope this post helps someone else as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top