I used the wonderful code at the link below to spell check form fields and it works great. I did need the code to be in the document that is being opened (not a template) so I used the Custom UI Editor to add a new tab and ribbon button to call the macro. I did have to add the control as IRibbonControl to the sub because I am working with ribbons and not toolbars.
The button and code works fine until I put on a password. I did add the password to the two areas in the code where I was told to add it to because we lock our forms with a password.
oDoc.Unprotect Password:="form"
oDoc.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="form"
Unfortunately, once I protect my document with the Restrict Editing tab, editing restrictions to filling in forms, an then enforce the protection with the word "form", the Spellcheck button no longer does anything when I click on it.
Is there something I am doing wrong?
http://word.mvps.org/FAQs/MacrosVBA/SpellcheckProtectDoc.htm
Thanks,
DebraAnn
DebraAnn