View Single Post
  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Spell Check in Forms

My web site is a Word based FAQ site (plus a few photographs). It has
advertising by Google AdSense, which if you consider that the traffic
charges on the site for January were £100! is not an unreasonable way of
recovering some of the costs of a site that provides the information it
contains for free. If you block the site, then it's your loss

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



gchr wrote:
I am unable to open the link you have listed below-we have certain
things blocked & yours come up blocked-Looks like you have an
advertisement for Real Estate with that link.

"Graham Mayor" wrote:

Basically all you have to do is to copy and paste the following into
your template (see http://www.gmayor.com/installing_macro.htm ) and
attach the macro to a toolbar button. If you have any other language
but English US - change the line
Selection.LanguageID = wdEnglishUS
to reflect that.
If your form has a password, insert the password between the quotes
at the two places the password is called for

ActiveDocument.Unprotect Password:=""
and
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""

and no there is no other way to spell check a protected form.


Sub SpellCheckForm()
Dim i As Integer
Dim bProtected As Boolean

'Unprotect the file
If ActiveDocument.ProtectionType wdNoProtection Then
bProtected = True
ActiveDocument.Unprotect Password:=""

End If

'check each formfield for spelling
For i = 1 To ActiveDocument.FormFields.Count
ActiveDocument.FormFields(i).Select
#If VBA6 Then
Selection.NoProofing = False
#End If
Selection.LanguageID = wdEnglishUS
Selection.Range.CheckSpelling
Next

'Reprotect the document.
If bProtected = True Then
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
End If
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



gchr wrote:
I have a protected form set up & am unable to run spell check. I've
read over the "How to enable the spellchecker..." from MVPS. Is
there any other way of doing this? Evidently MACROS are not my
friend & I've been trying to follow the directions & have had no
sucess yet! Please help!