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
Jezebel - 23 Feb 2005 20:56 GMT
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?
> 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
[quoted text clipped - 57 lines]
> End With
> End Sub
Oh God It's Him Again - 23 Feb 2005 21:23 GMT
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.
Jezebel - 23 Feb 2005 21:44 GMT
Try changing the macro to manipulate the dialog itself: read help on the
Dialogs() collection and how you use it.
>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
[quoted text clipped - 3 lines]
> once I open the spelchecking dialogue box again, even though I don't
> select/change anything when it does open.
Oh God It's Him Again - 23 Feb 2005 22:00 GMT
Sorry, don't understand the terminology or where to start on that
Jezebel - 23 Feb 2005 22:27 GMT
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.
> Sorry, don't understand the terminology or where to start on that
Oh God It's Him Again - 24 Feb 2005 17:02 GMT
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.
Jezebel - 24 Feb 2005 21:30 GMT
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.
> 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.
Oh God It's Him Again - 25 Feb 2005 16:17 GMT
Thanks a lot, will start playing over the weekend