Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

spell check protected document

305 views
Skip to first unread message

Abby

unread,
Mar 4, 2002, 5:15:32 PM3/4/02
to
Yes, this is a problem that stumps me. The spell and
grammar check is disabled (grayed out) when a MS Word
document is protected. Is there a work around for this?
If not can anyone recommmed a 3rd party software that will
create protected forms that can be spell checked?

Cindy Meister -WordMVP-

unread,
Mar 5, 2002, 4:31:34 AM3/5/02
to
Hi Abby,

> 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
:-)

Jeff

unread,
Mar 8, 2002, 11:11:12 AM3/8/02
to
I found a Macro that you can run to spellcheck the fields
in a protected form. This may help you. If you are using
fields, you'll have to have the macro run on each field
you want to spellcheck. I have pasted the text from the MS
website for the macro. Since this is new to me I looked
over the following link so I would know how to apply the
macro: http://support.microsoft.com/default.aspx?
scid=kb;en-us;Q212536 Hope this helps.

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

>.
>

0 new messages