macro to change spell check defaults

  • Thread starter Oh God It's Him Again
  • Start date
O

Oh God It's Him Again

Can anyone please help. On the computers at work, Word 2002 is run on
workstations from a central server. My employer has set various options to
what they think is best - obviously so that individual preferences aren't
imposed on everyone else. However, they do allow individuals to create their
own macros, and we each have our own Normal.dot - although we can't actually
see the folder where they are stored. So we can make some individual changes
such as creating macros, toolbar buttons etc, but only the one who creates
them can see them.

One of their options is to not have the spellchecker set to check spelling
as you type, so if you want to check as you type you have to set that every
time you open Word.

So I want to create a macro that will do that for me. So I started up the
macro recorder, opened the spellcheck dialogue box from "Tools - Spelling
and grammar", selected "options", selected the "spellcheck as you type"
option, closed out of the dialogue box and stopped the recorder. The macro
below is what was created.

Only thing is, when I run the macro it doesn't do anything on the face of
it. However if having run it I simply open the spellcheck dialogue box,
without doing anything else at all the macro suddenly kicks in.

Any help appreciated.

*******************************
Sub spellcheckauto()
'
' spellcheckauto Macro
' Macro recorded 23/02/2005 by fredsmith
'
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(wdEnglishUK).SpellingDictionaryType = wdSpelling
With CustomDictionaries
.ClearAll
.Add( _
"\\mlwcls01\appdata\terminal\johnpricemlw\Microsoft\Proof\CUSTOM.DIC"
_
).LanguageSpecific = False
.ActiveCustomDictionary = CustomDictionaries.Item( _
"\\mlwcls01\appdata\terminal\johnpricemlw\Microsoft\Proof\CUSTOM.DIC"
_
)
End With
End Sub
 
J

Jezebel

This is puzzling. If you are able to write macros then you have your own,
writable copy of normal.dot. In which case, why can't you save your own
options settings?
 
O

Oh God It's Him Again

I have no idea - all I can report is that this is the situation. I think
that the dictionary settings on our system operate differently to other
settings, but I don't know why.

In the end though I'm looking for input on why my macro will only operate
once I open the spelchecking dialogue box again, even though I don't
select/change anything when it does open.
 
J

Jezebel

Try changing the macro to manipulate the dialog itself: read help on the
Dialogs() collection and how you use it.
 
J

Jezebel

Look up "Dialogs" in VBA Help -- there are good examples. You can call the
dialog, set its properties, and execute it: as if you had opened the dialog
by clicking Tools > Options and changed the settings manually.
 
O

Oh God It's Him Again

OK thanks - starting to digest - do you know the name of the dialog that has
the spellcheck options? I can't see anywhere that lists them.
 
J

Jezebel

Most of the dialogs include the menu captions in their names. In this case

wdDialogToolsOptionsSpellingAndGrammar


To experiment, you can type, in the immediate window

Dialogs(wdDialogToolsOptionsSpellingAndGrammar).Display


This displays the dialog but does nothing with the input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top