Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2016, 07:15 PM
PSSMargaret PSSMargaret is offline VBA Code for Grammar Check Not Working in Word 2016 Windows 10 VBA Code for Grammar Check Not Working in Word 2016 Office 2010 64bit
Novice
VBA Code for Grammar Check Not Working in Word 2016
 
Join Date: May 2016
Posts: 28
PSSMargaret is on a distinguished road
Default VBA Code for Grammar Check Not Working in Word 2016

The code below works perfectly in Word 2010 for spell checking and grammar checking but it's not working in Word 2016. Does anyone have an idea why?



HTML Code:
Sub RunSpellCheck()
   ActiveDocument.Unprotect
   Selection.WholeStory
   Selection.LanguageID = wdEnglishUS
   ActiveDocument.CheckSpelling
   ActiveDocument.CheckGrammar
   ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End Sub
Reply With Quote
  #2  
Old 06-10-2016, 03:08 PM
PSSMargaret PSSMargaret is offline VBA Code for Grammar Check Not Working in Word 2016 Windows 10 VBA Code for Grammar Check Not Working in Word 2016 Office 2010 64bit
Novice
VBA Code for Grammar Check Not Working in Word 2016
 
Join Date: May 2016
Posts: 28
PSSMargaret is on a distinguished road
Default

I edited the code (below) and as I said, it runs perfect on my computer with Word 2010 but on another computer with Word 2016, the grammar portion is not running. Help!


Code:
Sub RunSpellCheck()
    ActiveDocument.Unprotect
    Selection.WholeStory
    Selection.LanguageID = wdEnglishUS
    If Options.CheckGrammarWithSpelling = True Then
        ActiveDocument.CheckGrammar
    Else
        ActiveDocument.CheckSpelling
    End If
 
   ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End Sub
I should also include that it's checking legacy form fields when the form unlocks.
Reply With Quote
  #3  
Old 06-11-2016, 10:53 PM
macropod's Avatar
macropod macropod is offline VBA Code for Grammar Check Not Working in Word 2016 Windows 7 64bit VBA Code for Grammar Check Not Working in Word 2016 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Cross-posted at: http://answers.microsoft.com/en-us/o...6-16ee84843d5e
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code for Grammar Check Not Working in Word 2016 Spell check and grammar insists that a word should be capitalized, but it should not x7lillies Word 3 07-30-2014 02:02 PM
VBA Code for Grammar Check Not Working in Word 2016 Check grammar but NOT spelling with VBA ilcaa72 Word VBA 1 02-13-2014 12:15 PM
spell and grammar check bull Word 2 07-24-2013 10:28 AM
VBA Code for Grammar Check Not Working in Word 2016 spelling and grammar check question sledge105 Word 1 08-17-2011 02:09 PM
VBA Code for Grammar Check Not Working in Word 2016 Spelling/Grammar check on a novel Quadrillion Word 3 08-13-2011 02:57 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft