Seriously off topic: Ignoring spelling and grammar in certain text styles in Microsoft Word

When writing detailed design and deployment guides I get frustrated by Word rightly having issue with the spelling and grammar of my PowerShell snippets.  It makes the Spelling and Grammar checker almost redundant, for example, in my 374 page detailed design document.  I’ve recently realised how to make life easier.  I’m slowly but surely moving from a raw document formatted using indentation, bold, italic and the direct application of fonts to styles, i.e. the way things are supposed to be done in Word.  As I make this transition I’m more productive, but I digress.  Here’s my off-topic tip:  Exclude certain styles from the spelling and grammar checker.

I’ve modified the style Code Block such that I have a paragraph in the Courier New font, size 8pt, enclosed in single, black-line borders.  To stop the spelling and grammar checker from complaining about lowercase sentence beginnings and misspelled words I did the following:

  • Selected some text that has the Code Block style applied.
  • Clicked the Styles button (Alt + Ctrl + Shift + S) –I use this a lot (the inspector too), and then clicked Style Inspector.
  • From the style inspector I click the drop-down on the Code Block style and choose Modify…
  • Next I click Format| Language and then check Do not check spelling or grammar
  • Followed by OK and OK.

And then I’m done.  Any text marked as Code Block (which I use for not just code but PowerShell syntax examples and console output from deployment scripts, etc.) is excluded from the spelling and grammar checker.  Awesome!

I use a similar technique for attribute names.  I have created a custom style called attributeNames that formats on a per-word basis a word into Courier New (same pt. size as Normal).  When writing lower camel case (e.g. metaverse attribute naming) or upper camel case names (e.g. FIM Service attribute naming), e.g. mDBUseDefaults or DisplayName, I apply this style.  The attribute is emphasised through the font but also exempt from the spelling and grammar checker.

 

Advertisements

About Paul Williams

IT consultant working for Microsoft specialising in Identity Management and Directory Services.
This entry was posted in Off-topic and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s