Solved

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

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…

726 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