Results 1 to 7 of 7
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No NoProof in range CheckSpelling (Word97/SR2)

    Unless I'm very much mistaken, there's a gap in the spell-checker logic as assigned to us VBA types:

    I select a word in a document and run the TEST macro below. The word is in error, so I get the MsgBox.

    I then run Tools, Spelling from Word, get the error, and then set the language to Noproofing (Tools, Set Language ...).
    I then run Tools, Spelling from Word, and note that the error is now gone, presumably because my Language got set correctly.

    The word in the document is still selected, so I re-run the TEST macro below and find that the word is still in error.

    I can't see a way, in calling up CheckSpelling, to tell Word to ignore those words whose language is set to Noproofing.

    Am I losing it, or is there a gap here in the implementation?


    <pre>Public Function SpellCheckWord(rngWord As Range)
    If CheckSpelling(rngWord) Then
    Else
    MsgBox "Still being checked!"
    End If
    End Function
    Sub TESTSpellCheckWord()
    Call SpellCheckWord(Selection.Range)
    End Sub

    </pre>


    (From the Help files:
    " Syntax 1 : expression.CheckSpelling(CustomDictionary, IgnoreUppercase, AlwaysSuggest, CustomDictionary2

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: No NoProof in range CheckSpelling (Word97/SR2)

    Although I can't find anything about it in the MSKB or in the newsgroups, there seems to be a problem here. It still occurs in Word 2002.

    As long as you select a single word, you can check if rngWord.NoProofing is False, but if you select more than one word, and NoProofing is on for part of the selection and off for another part, NoProofing will be 9999999 indicating "mixed".

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No NoProof in range CheckSpelling (Word97/SR2)

    Hans, thank you for the quick and apparently exhaustive response. It helps me a lot to know that I'm not going crazy through un-natural causes.

    I'll poke around a bit more and see (a) what other problems I can dig up and ([img]/forums/images/smilies/cool.gif[/img] whhat workarounds I can suggest.

    I had already noted Word's traditional limit of 9 dictionaries. We are dealing here with the same team that wrote the MRU list, right?

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: No NoProof in range CheckSpelling (Word97/SR2)

    Beware the nine-fingered MS programmers, they seem to kill off the more digitally abled staffers.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No NoProof in range CheckSpelling (Word97/SR2)

    > more digitally abled staffers

    I'm going to let the typo slip through this time; don't want to arouse feelings .....

    Do you remember I conjured up Harold to explain all this weird no-reason-for-this-design stuff? It's Harold soap opera time, all over again! Like Berlioz's Harold in Italics!

  6. #6
    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: No NoProof in range CheckSpelling (Word97/SR2)

    What is the rest of your code? The following routine honors the No Proofing setting if it is set immediately prior to checking. (Not sure how "durable" that setting is.)

    <pre>Sub TryItThisOtherWay()
    Dim rngTemp As Range
    Set rngTemp = Selection.Range
    rngTemp.CheckSpelling
    Set rngTemp = Nothing
    End Sub</pre>

    Tested only in Word 2002.

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No NoProof in range CheckSpelling (Word97/SR2)

    > rngTemp.CheckSpelling

    Works great! Thanks. I had started to move in this direction (Range.CheckSpelling) late yesterday afternoon. Am now heading off to a paying client, but I will examine this more closely. Amongst other things I'll set up a sample with a method that works, and a method that appears not to work.

Posting Permissions

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