Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reset Spell Options (2000)

    This code only reset the spell options. It is an autocreated code. The macro was recorded as a play macro. Let's face it, this is the first time I have seen something like that. All what I did, I do have an exclude dictionary for another language. I do have an autonew and an autoclose macro. The autoclose macro delete the dictionary when I exit the template, and the autonew copy it when I create a new document based on that template. Everything is working fine. When I create a new document based on the template, I have to go and reset the spell option. I do it manually, goto option, uncheck spell as you type click ok and go back to the option check spell as you type and click ok. It works fine like that. After I do this manual reset, now I can have spell as you type, if I type something. All my english word are misspelled. Now, I recoded a play macro to do it automatically, here is the autoplay macro below. For any reason, it does not work. I don't see the difference between that code and what I did manually. This code is simply a manual automation.


    Sub test()

    With Options
    .CheckSpellingAsYouType = False
    .CheckGrammarAsYouType = False
    .SuggestSpellingCorrections = True
    .SuggestFromMainDictionaryOnly = False
    .CheckGrammarWithSpelling = True
    .ShowReadabilityStatistics = False
    .IgnoreUppercase = True
    .IgnoreMixedDigits = True
    .IgnoreInternetAndFileAddresses = True
    .AllowCombinedAuxiliaryForms = True
    .EnableMisusedWordsDictionary = True
    .AllowCompoundNounProcessing = True
    .UseGermanSpellingReform = True
    End With
    ActiveDocument.ShowGrammaticalErrors = True
    ActiveDocument.ShowSpellingErrors = True
    Languages(wdEnglishUS).SpellingDictionaryType = wdSpelling
    Languages(wdEnglishUS).DefaultWritingStyle = "Standard"
    ActiveDocument.ActiveWritingStyle(wdEnglishUS) = "Standard"
    With CustomDictionaries
    .ClearAll
    .Add("C:WINDOWSApplication DataMicrosoftProofCUSTOM.DIC"). _
    LanguageSpecific = False
    .ActiveCustomDictionary = CustomDictionaries.Item( _
    "C:WINDOWSApplication DataMicrosoftProofCUSTOM.DIC")
    End With
    With Options
    .CheckSpellingAsYouType = True
    .CheckGrammarAsYouType = False
    .SuggestSpellingCorrections = True
    .SuggestFromMainDictionaryOnly = False
    .CheckGrammarWithSpelling = True
    .ShowReadabilityStatistics = False
    .IgnoreUppercase = True
    .IgnoreMixedDigits = True
    .IgnoreInternetAndFileAddresses = True
    .AllowCombinedAuxiliaryForms = True
    .EnableMisusedWordsDictionary = True
    .AllowCompoundNounProcessing = True
    .UseGermanSpellingReform = True
    End With
    ActiveDocument.ShowGrammaticalErrors = True
    ActiveDocument.ShowSpellingErrors = True
    Languages(wdEnglishUS).SpellingDictionaryType = wdSpelling
    Languages(wdEnglishUS).DefaultWritingStyle = "Standard"
    ActiveDocument.ActiveWritingStyle(wdEnglishUS) = "Standard"
    With CustomDictionaries
    .ClearAll
    .Add("C:WINDOWSApplication DataMicrosoftProofCUSTOM.DIC"). _
    LanguageSpecific = False
    .ActiveCustomDictionary = CustomDictionaries.Item( _
    "C:WINDOWSApplication DataMicrosoftProofCUSTOM.DIC")
    End With
    End Sub

  2. #2
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Quakertown, PA, Pennsylvania, USA
    Posts
    517
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reset Spell Options (2000)

    I'm confused as to exactly what it is you're trying to accomplish. Is it me?

  3. #3
    3 Star Lounger
    Join Date
    May 2001
    Location
    Burlington, KS, USA
    Posts
    209
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Reset Spell Options (2000)

    I'm not sure what it is you are trying to accomplish. From the looks of the code, you are turning Check spelling as you type off and on, along with removing and reassociating the custom.dic. I can't imagine why it would be necessary to do this.
    The postings on this site are my own and do not necessarily represent the position or opinion of WCNOC.

  4. #4
    Star Lounger
    Join Date
    Apr 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reset Spell Options (2000)

    This is the way it works in Word. Every time you add an exclude dictionary you have to exit Word and open it back. After I added an exclude dictionary by using autonew macro from another template, I should have exited Word and got back to it. Since there is no way I can write a macro to exit Word and open it back over, the only way it works is to reset the spell check option. I did it manually and it works fine. All what I did, go to spell options uncheck spell as you type->ok then go back to it, check spell as you type and click ok. Now, all my english words that I type are misspelled. All that I did, I autoplayed a macro to do the manual process, but unfortunately it did not work.

    I hope by now you understand me. All that I want to know why the manuall process works and the auto process does not and how can I make it work? I know there is now way I can reset word automatically. I mean exit Word and open it back. Whenever you add an exclude dicitonary in Word, you have to reset it by exiting Word and open it back. This also gives the same result when you go to spell options, uncheck spell as you type click ok and go back to spell options and check back spell as you type and click ok.

    I hope you get the idea by now.

  5. #5
    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: Reset Spell Options (2000)

    Maybe that last part, clearing and adding the dictionaries a second time, is the problem? What if you simplify:

    Sub test()
    Options.CheckSpellingAsYouType = False
    With CustomDictionaries
    .ClearAll
    .Add("C:WINDOWSApplication DataMicrosoftProofCUSTOM.DIC"). _
    LanguageSpecific = False
    .ActiveCustomDictionary = .Item( _
    "C:WINDOWSApplication DataMicrosoftProofCUSTOM.DIC")
    End With
    Options.CheckSpellingAsYouType = True
    ActiveDocument.ShowSpellingErrors = True
    End Sub

  6. #6
    Star Lounger
    Join Date
    Apr 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reset Spell Options (2000)

    Thank you, I will try that later this evening and let you know.

  7. #7
    Star Lounger
    Join Date
    Apr 2002
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reset Spell Options (2000)

    I have tried it the way you suggested, it does not work. They must be something in the registry that is updated when doing it manually. I don't know much about VBA an registry. Does VBA gives access to registry as does VB?

Posting Permissions

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