Solved

URGENT (sorry about the few points) - Turning SpellCheck on in Word 2000

Posted on 2003-11-06
5
228 Views
Last Modified: 2009-12-16
I need to know how to turn the 'Spell check while typing' on in Word 2000 using a macro (on opening a document from a template, i.e. in an AutoOpen or AutoNew sub).

Doesn't seem like it should be that hard but I just can't find anything anywhere.

-Neo
0
Comment
Question by:NeoTeq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 75 total points
ID: 9692967
Private Sub Document_New()
   .CheckSpellingAsYouType = True
End Sub

'This is a list of all available option in the spell tab
    With Options
        .CheckSpellingAsYouType = True
        .CheckGrammarAsYouType = True
        .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
    With CustomDictionaries
        .ClearAll
        .Add( _
            "C:\Documents and Settings\c\Application Data\Microsoft\Proof\CUSTOM.DIC" _
            ).LanguageSpecific = False
        .ActiveCustomDictionary = CustomDictionaries.Item( _
            "C:\Documents and Settings\c\Application Data\Microsoft\Proof\CUSTOM.DIC" _
            )
    End With

~ fantasy~
0
 
LVL 5

Assisted Solution

by:IThema
IThema earned 25 total points
ID: 9693035
Hello Neo,

Note that this options is a global word option and will affect the spellcheck properties of all your future documents. So I advise you this on beforehand: Before you SET the properties, read them and store them somehow (variables, registry, textfile, database or whatever suits you; propably variables :D ). You can then set the spellcheck properties, do your macro-thing and then restore the properties with your stored properties.

Now, since these are global properties, you should look for them in the global word application object. Not in a word document object.

The global properties are called (Application is a Word application object, version 9.0 - Office 2000):
  Application.Options.CheckGrammarAsYouType
  Application.Options.CheckGrammarWithSpelling
  Application.Options.CheckSpellingAsYouType <----- You wanted this one

However, there are 2 options which are bound to a Word document object. However, these options are stored and used for all future word documents. These options are (objWordDocument references an item in the word application documents collection):
  objWordDocument.ShowSpellingErrors
  objWordDocument.ShowGrammaticalErrors

All options are boolean. Try and find out that these last 2 properties also affect all other future documents :s However, if you have

These properties cannot be set in the documents.open method.


Good luck! Let me know if it worked.

Luc Derckx
0
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9693077
Sorry,
should be

Private Sub Document_New()
   Options.CheckSpellingAsYouType = True
End Sub
0
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9693085
Give you a tips, if you face this kind of problem next time, use macro->record, then perform your task. Back to vbeditor and view the macro code. Cheers

~ fantasy ~
0
 
LVL 10

Author Comment

by:NeoTeq
ID: 9693088
I used the autonew and autoopen macros...

Thanks both!
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question