> The spell and
> grammar check is disabled (grayed out) when a MS Word
> document is protected. Is there a work around for this?
>
It requires a macro (VBA) solution. You'll find a very
simple macro on my website, and one that covers just about
every eventuality on the MVPS site :-)
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum
This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
BELOW IS THE TEXT FROM THE MICROSOFT WEBSITE:
Method 3: Unprotect, Check Spelling or Update a Field,
Reprotect a Document
Because form field text is formatted for No Proofing, you
can use the following macro to:
Temporarily unprotect the form.
Change the language of the form fields.
Perform a spelling check or update a field.
Reprotect the form while preserving the text you've typed
into the form fields.
You can use this macro as an On Exit macro for the last
form field so you can check the spelling or update a field
before you save the form.
Sub FormsSpellCheck()
' If document is protected, Unprotect it.
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect Password:=""
End If
' Set the language for the document.
Selection.WholeStory
Selection.LanguageID = wdEnglishUS
Selection.NoProofing = False
' Perform Spelling/Grammar check.
If Options.CheckGrammarWithSpelling = True Then
ActiveDocument.CheckGrammar
Else
ActiveDocument.CheckSpelling
End If
' ReProtect the document.
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
End If
End Sub
IMPORTANT NOTE : There are some differences in Visual
Basic for Applications between Microsoft Word 2000 and
Microsoft Word 97 for Windows due to the Enabled Language
Settings feature in Microsoft Office 2000. One of the
differences is noted in the above macro. To correctly
check the spelling of a document after setting the
LanguageID, you must set the NoProofing property in Word
2000. However, if you attempt to run this macro in
Microsoft Word 97 for Windows, you will receive the
following error message:
Compile error:
Method or data member not found
For additional information about how to do this in
Microsoft Word 97 for Windows, click the article number
below to view the article in the Microsoft Knowledge Base:
Q181108 WD97: Form Fields Lose Text When Protected for
Forms
REFERENCES
For additional information about getting help with Visual
Basic for Applications, click the article numbers below to
view the articles in the Microsoft Knowledge Base:
Q212623 WD2000: Macro Programming Resources
Q226118 OFF2000: Programming Resources for Visual Basic
for Applications
-----------------------------------------------------------
---------------------
Published Feb 12 1999 11:47AM Issue Type kbhowto
Last Modifed Jul 31 2001 5:07PM Additional Query Words
kbmacro vba checkspelling word form field protect spell
check spellcheck
Keywords kbprogramming kbdta wd2000 kbofficeprog
>.
>