Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Stone Ridge, New York, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Spellcheck Macro for 2003 (Word 2003)

    Hi. I need to spellcheck the contents of 2 particular fields in a protected form. I've used the same macro to do this in other forms in Word 2000 and 2002 with no problem but it is not working in Word 2003. The spellcheck doesn't work at all in 2003 unless you get Service Pack 1, which we did and we thought that would correct the problem with the macro as well, but it still isn't working. It functions, but no matter how many spelling errors there are, it doesn't catch any of them. Has anyone else come up against this and does anyone have a macro to spellcheck particular formfields in a Word 2003 protected form? The Formfield bookmarks are "Narrative1" and "Narrative2". Any help would be tremendously appreciated. Thanks.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Spellcheck Macro for 2003 (Word 2003)

    One possible reason: Word has applied the "No Proofing" property to the contents of the form fields. I'm not sure exactly how to clear this in Word 2003, since its Forms model is somewhat different, but this works in a little test in Word 2002:
    <pre>Sub FormFieldsRemoveNoProofing()
    Dim ff As FormField
    With ActiveDocument
    For Each ff In .FormFields
    If ff.Type = wdFieldFormTextInput Then
    .Unprotect 'Assumes no password!
    ff.Range.NoProofing = False
    .Protect wdAllowOnlyFormFields, True
    End If
    Next
    End With
    If Not (ff Is Nothing) Then Set ff = Nothing
    End Sub</pre>

    Hope this helps.

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Location
    Stone Ridge, New York, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck Macro for 2003 (Word 2003)

    Hi. I already have this sub in there:

    Private Sub TurnNoProofingOff(FmFld As FormField)
    'This subroutine is called only in Word 2000 and above
    FmFld.Range.NoProofing = False
    End Sub

    Do you think I should replace that with the one you've provided?

    Also, do you know where I could get some info on how they've changed their Forms model for 2003? I have ALOT of forms that were created in 2000 and 2002 and I'm getting a little nervous!

    Thanks alot!

    By the way, my Spellcheck macro works fine in 2002. It's only in 2003 that it doesn't work.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Spellcheck Macro for 2003 (Word 2003)

    Sounds as though you had that issue covered already. <img src=/S/sad.gif border=0 alt=sad width=15 height=15>

    There were a lot of "what's new" articles on Microsoft's web site last year when Office 2003 was launched, but perhaps if you skim over the ones aimed at developers there will be more details on form fields than the usual marketing fluff. The most interesting feature I remember was the change in the protection model, where rather than protecting sections, you could drill down to much more limited objects, perhaps even to individual fields themselves. That should, in theory, solve many of the previous problems with Word forms, but perhaps it breaks some of the .Unprotect/.Protect code that worked in earlier versions?

    When I get around to trying Office 2003 (later this year?) I will definitely be interested in how this turns out!

  5. #5
    Star Lounger
    Join Date
    Apr 2002
    Location
    Stone Ridge, New York, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck Macro for 2003 (Word 2003)

    Hi. Just wanted to let you know that the Spellcheck macro works just fine in Word 2003. Problem was the User was typing in all caps and had their spelling and grammar options set to not check words in all caps! Thanks for your time.

  6. #6
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spellcheck Macro for 2003 (Word 2003)

    Hi Jefferson,

    In your Sub FormFieldsRemoveNoProofing, you switch doc protection off / on in the loop. Is there a special reason for this? I always switch protection off /on just before and after the loop.

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Spellcheck Macro for 2003 (Word 2003)

    No reason, just the way I threw it together. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •