Solved

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

Posted on 2003-11-06
5
214 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA Excel: fill / replace values based on a config sheet. 5 61
VBA color chart bars 12 79
Visual Studio 2005 text editor 10 35
TT Auto Dashboard 13 85
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

862 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

21 Experts available now in Live!

Get 1:1 Help Now