PDA

View Full Version : Solved: 4605 Error in Word Forms



bhall2271
10-02-2007, 07:01 AM
:help I'm very new at VB. Got this code from your site to build Word forms which need spell check for narrative form fields since spell check is not available on a locked form. When you tab out of the field spell check initiates. Works on the form for all but 3 fields that it is assigned to. All are text fields with no special programming or formatting. The fields are in a table. The error is 4605 not available because the object refers to a protected area of the document. When I debug it fails on .Range.CheckSpelling. Any help would really be appreciated.
Thanks, Bobbie

Code:
Sub myCheckSpelling()


MsgBox "field spell check"


'Select Paragraph
ActiveDocument.Bookmarks("\Para").Select
With Selection
#If VBA6 Then
'Only Word > 2000
.NoProofing = False
#End If
'Set language
.LanguageID = wdEnglishUS
'Run spell checker
.Range.CheckSpelling
End With
End Sub