Saturday, October 15, 2011

Microsoft Word: Disabling spellcheck for a block of text

Often times, when I'm putting together a piece of documentation for work, it helps to include code samples and console commands in the document. I like to use Word to write documentation because it allows you to stylize the text (such as increasing the font size of headers, making things bold, etc) which I think makes it easier to read (when used in moderation). It's also nice for code samples because when you copy and paste code from Eclipse, it includes the syntax-highlighting of the code. Creating plain text files is simpler, but you loose that readability aspect I think is important.

Anyway, one annoying thing is that Word spell checks and grammar checks these code samples and console commands, so you get all these red and green squiggly lines under the text.

However, it is possible to disable spell and grammar check for selected blocks of text! First, select the text that you want to exclude from being checked. Then, select the "Review" tab from the ribbon at the top of the screen and click on "Set Language".

In the dialog window that appears, click the "Do not check spelling and grammar" checkbox and click "OK". If your document happens to have multiple written languages in it, you can also use this dialog to tell Word which blocks of text are written in which language.

Now, those squiggly lines should disappear!

5 comments:

Garry @ TriSys said...

Thanks for posting solution.
I'm a developer so have VB, C# and SQL code in my documents!

Anonymous said...

It worked perfectly, thanks!

Anonymous said...

Very Much appreciated.....!!

Anonymous said...

Thank you so much!

Xray said...

Thanks - this should much more obvious in Word...