While learning some programming language, I make notes in MS Word as I refer to various books and other such resources. As it happens, I also add code to my notes.

To keep things clean, I have created a style named "Code" and for this style I have selected the option "Do not check spelling or grammar" in the "Language" section of the Format options (all in Modify Style dialog box).

However, Word doesn't seem to be obeying this option and it keeps checking the spelling errors and shows the red wiggly/wavy underlines all over the place in my code.

I have already closed and opened MS Word several times; I also have an old Word document with lot of code and with similar style set-up, and that document also has same problem now (it was originally created in Word 2010 and at that time it worked fine).

Other than above, spell and grammar check ran normally in all documents I opened. It is just that at present MS Word doesnt' seem to respect the style option.

Any ideas?

Update: I am running Office 365 Home on Windows 10 Home on a desktop computer.

  • Make sure the Code Style is not based on any other style and set its properties, such as font, as you need them. Also, when you add the actual code, are you putting it on its own paragraph? Which, makes me wonder if your Code Style a Paragraph Style or Character Style? – Rich Michaels Jun 6 '19 at 16:02

I am not sure exactly what happened but I took a chance and it worked.

I had installed Grammarly add-in a few days ago and it seems that it may have a role to play here. I removed the add-in from Word and the problem went away. Now I have reinstalled the add-in and the problem hasn't reappeared.

Thank you all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.