Two macros
The solution is to create two macros. One is to turn Spelling and Grammar as you type on, and the other is to turn it off.
In Microsoft software, you are able to record a sequence of actions and assign them to a button or keyboard shortcut
Follow these steps precisely to create the ones specific to this solution.
Macro 1: Spelling off
Click View > Macros > Record macro
Type "spelling_off" into the Macro name field (Spaces aren't permitted so use underscore _ character) and click the hammer button.
Click 'Normal.NewMacros.spelling_off' and then the 'Add >>' button
Click 'Modify...' and choose a graphic and click OK. (I choose the red square)
Click OK in the Word Options screen.
Click Review > Language > Language preferences > Proofing
Uncheck 'Check spelling as you type'
Uncheck 'Mark grammar as you type'
Click OK
Click View > Macros > Stop Recording
The macro code will look like this:
Sub spelling_off()
'
' spelling_off Macro
'
'
Options.CheckGrammarAsYouType = False
Options.CheckSpellingAsYouType = False
End Sub
Macro 2: Spelling on
Click View > Macros > Record macro
Type "spelling_on" into the Macro name field and click the MC Hammer button.
Click 'Normal.NewMacros.spelling_on' and then the 'Add >>' button
Click 'Modify...' and choose a graphic and click OK. (I choose the green square)
Click OK in the Word Options screen.
Click Review > Language > Language preferences > Proofing
Check 'Check spelling as you type'
Check 'Mark grammar as you type'
Click OK
Click View > Macros > Stop Recording
The macro code will look like this:
Sub spelling_on()
'
' spelling_on Macro
'
'
Options.CheckGrammarAsYouType = True
Options.CheckSpellingAsYouType = True
End Sub
...and that's it!
Where do the buttons appear?
The buttons appear in the top left hand corner of Microsoft Word.
Important note
After clicking a button, you will need to click anywhere on the document for the underlining to appear or disappear, and it's due to a bug in Microsoft Word, so you and I are unable to do anything about it. (unless you work for Microsoft of course!)