Solved

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

Posted on 2003-11-06
5
210 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
  • 3
5 Comments
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 75 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry,
should be

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

Expert Comment

by:fantasy1001
Comment Utility
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
Comment Utility
I used the autonew and autoopen macros...

Thanks both!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now